Friday, 26 January 2024

Revisiting Odds And Evens

It's been a while since I posted about so-called odds and evens by which I mean the process of generating a new number from an existing one by adding its sum of odd digits and subtracting it's sum of even digits. An an example, let's consider 1234:$$1234 \rightarrow 1234+1+3-2-4=1232$$As we continue this process interesting things happen and that's what I wrote about in a paper that I published to Academia (link). Here are links to posts I've made about the topic:

Of course, if the sums of the odd and even digits are the same, the number remains unchanged. These sorts of numbers are what I termed "attractors" because other numbers, wherein there is an imbalance of odds and evens, have either these as their termini or they enter "vortices" or loops. My diurnal age today, 27326, is one such attractor which is why I was reminded of them. $$27326 \rightarrow 27326 + 7 + 3-2-2-6=27326$$Until now, I wasn't aware that they had their own OEIS sequence but they do and it is OEIS A036301 (permalink):


 A036301

Numbers whose sum of even digits and sum of odd digits are equal. 
          


The initial members of the sequence are:

0, 112, 121, 134, 143, 156, 165, 178, 187, 211, 314, 336, 341, 358, 363, 385, 413, 431, 516, 538, 561, 583, 615, 633, 651, 718, 781, 817, 835, 853, 871, 1012, 1021, 1034, 1043, 1056, 1065, 1078, 1087, 1102, 1120, 1201, 1210, 1223, 1232, 1245, 1254, 1267, 1276, 1289, 1298

I also discovered a sequence connected to what I termed "vorticals". These are the numbers that comprise a vortex into which non-balanced numbers are sucked if they do not end up in an attractor. The first instance of a vortex is that involving the numbers 11 and 13:$$11 \rightarrow 11 + 1 + 1 = 13\\13 \rightarrow 13 + 1 + 3 =17\\ 17 \rightarrow 17+1+7 =25\\25 \rightarrow 25+5-2=28\\28 \rightarrow 28-2-8=18\\18 \rightarrow 18+1 -8=11$$Thus 11, 13, 17, 18, 25 and 28 are all numbers that eventually return to themselves after repeated mappings involving the odds and evens recursion. In the case of these numbers, six repetitions are needed: $$11 \rightarrow 13 \rightarrow 17 \rightarrow 25 \rightarrow 28 \rightarrow 18 \rightarrow 11$$Numbers like these are included in OEIS A124176:


 A124176

Consider the map \(f\) that sends \(m\) to \(m\) + (sum of odd digits of \(m\)) - (sum of even digits of \(m\)). Sequence gives numbers \(m\) such that \(f^k(m) \) = \(m\) for some \(k\).



This will include all the attractors, the numbers that aren't changed by the mapping and where \(k\)=1. The initial members are (permalink):

0, 11, 13, 17, 18, 25, 28, 54, 55, 64, 65, 112, 121, 134, 137, 143, 148, 155, 156, 165, 166, 173, 178, 184, 187, 198, 200, 209, 211, 216, 231, 233, 234, 237, 244, 245, 270, 275, 280, 285, 314, 336, 341, 358, 363, 385, 396, 402, 407, 410, 413, 429, 431, 432

All other numbers are what I termed "captives" because they are "captured" by either an attractor or a "vortex" that is comprised of "vorticals". The attractors and vorticals are all listed in OEIS A124176 and OEIS A036301 is a subset of this sequence because it contains only the attractors that are invariant under the mapping.

There are 2974 such numbers in the range up to 40,000. Here are the numbers from 27326 up to 40000 that belong in the sequence (for future reference):

27326, 27344, 27362, 27380, 27412, 27421, 27434, 27437, 27443, 27448, 27455, 27456, 27465, 27466, 27473, 27478, 27484, 27487, 27528, 27546, 27564, 27582, 27601, 27610, 27617, 27623, 27624, 27632, 27635, 27642, 27645, 27653, 27654, 27660, 27667, 27676, 27689, 27698, 27748, 27766, 27784, 27803, 27825, 27830, 27847, 27852, 27869, 27874, 27896, 27968, 27986, 27990, 28004, 28007, 28013, 28019, 28037, 28055, 28073, 28091, 28093, 28095, 28097, 28099, 28101, 28103, 28105, 28107, 28109, 28190, 28239, 28257, 28275, 28293, 28295, 28297, 28299, 28301, 28303, 28305, 28307, 28329, 28370, 28392, 28459, 28477, 28495, 28497, 28499, 28501, 28503, 28505, 28527, 28549, 28550, 28572, 28594, 28679, 28697, 28699, 28701, 28703, 28725, 28730, 28747, 28752, 28769, 28774, 28796, 28899, 28901, 28910, 28917, 28923, 28924, 28932, 28935, 28942, 28945, 28953, 28954, 28960, 28967, 28976, 28989, 28998, 29018, 29081, 29108, 29126, 29144, 29162, 29180, 29216, 29238, 29261, 29283, 29328, 29346, 29364, 29382, 29414, 29436, 29441, 29458, 29463, 29485, 29548, 29566, 29584, 29612, 29621, 29634, 29637, 29643, 29648, 29655, 29656, 29665, 29666, 29673, 29678, 29684, 29687, 29768, 29786, 29801, 29810, 29817, 29823, 29824, 29832, 29835, 29842, 29845, 29853, 29854, 29860, 29867, 29876, 29889, 29898, 29988, 30014, 30036, 30041, 30058, 30063, 30085, 30104, 30122, 30140, 30178, 30181, 30212, 30221, 30234, 30237, 30243, 30248, 30255, 30256, 30265, 30266, 30273, 30278, 30284, 30287, 30306, 30324, 30342, 30360, 30378, 30383, 30384, 30401, 30410, 30417, 30423, 30424, 30432, 30435, 30442, 30445, 30453, 30454, 30460, 30467, 30476, 30489, 30498, 30508, 30526, 30544, 30562, 30580, 30597, 30603, 30608, 30615, 30617, 30618, 30621, 30622, 30625, 30630, 30647, 30652, 30669, 30674, 30696, 30728, 30746, 30764, 30782, 30795, 30805, 30806, 30812, 30813, 30819, 30824, 30827, 30849, 30850, 30872, 30894, 30948, 30966, 30984, 31004, 31022, 31040, 31078, 31081, 31116, 31138, 31161, 31183, 31202, 31220, 31235, 31238, 31245, 31248, 31318, 31381, 31400, 31411, 31413, 31417, 31418, 31425, 31428, 31454, 31455, 31464, 31465, 31598, 31608, 31609, 31611, 31616, 31631, 31633, 31634, 31637, 31644, 31645, 31670, 31675, 31680, 31685, 31807, 31810, 31813, 31829, 31831, 31832, 31850, 31851, 31853, 31857, 31860, 31865, 32012, 32021, 32034, 32037, 32043, 32048, 32055, 32056, 32065, 32066, 32073, 32078, 32084, 32087, 32102, 32120, 32135, 32138, 32145, 32148, 32201, 32210, 32217, 32223, 32224, 32232, 32235, 32242, 32245, 32253, 32254, 32260, 32267, 32276, 32289, 32298, 32304, 32322, 32340, 32378, 32381, 32397, 32403, 32408, 32415, 32417, 32418, 32422, 32425, 32430, 32447, 32452, 32469, 32474, 32496, 32506, 32524, 32542, 32560, 32578, 32583, 32584, 32595, 32605, 32606, 32615, 32616, 32627, 32649, 32650, 32672, 32694, 32708, 32726, 32744, 32762, 32780, 32793, 32804, 32807, 32810, 32813, 32829, 32870, 32892, 32928, 32946, 32964, 32982, 33006, 33024, 33042, 33060, 33078, 33083, 33084, 33118, 33181, 33204, 33222, 33240, 33278, 33281, 33402, 33420, 33435, 33438, 33445, 33448, 33600, 33611, 33613, 33617, 33618, 33625, 33628, 33654, 33655, 33664, 33665, 33809, 33811, 33816, 33831, 33833, 33834, 33837, 33844, 33845, 33870, 33875, 33880, 33885, 34001, 34010, 34017, 34023, 34024, 34032, 34035, 34042, 34045, 34053, 34054, 34060, 34067, 34076, 34089, 34098, 34100, 34111, 34113, 34117, 34118, 34125, 34128, 34154, 34155, 34164, 34165, 34197, 34203, 34208, 34213, 34214, 34225, 34230, 34247, 34252, 34269, 34274, 34296, 34302, 34320, 34335, 34338, 34345, 34348, 34395, 34405, 34408, 34411, 34427, 34449, 34450, 34472, 34494, 34504, 34522, 34540, 34578, 34581, 34593, 34606, 34607, 34609, 34611, 34629, 34670, 34692, 34706, 34724, 34742, 34760, 34778, 34783, 34784, 34791, 34793, 34801, 34804, 34805, 34807, 34809, 34811, 34890, 34908, 34926, 34944, 34962, 34980, 35008, 35026, 35044, 35062, 35080, 35206, 35224, 35242, 35260, 35278, 35283, 35284, 35404, 35422, 35440, 35478, 35481, 35602, 35620, 35635, 35638, 35645, 35648, 35800, 35811, 35813, 35817, 35818, 35825, 35828, 35854, 35855, 35864, 35865, 36003, 36025, 36030, 36047, 36052, 36069, 36074, 36096, 36109, 36111, 36116, 36131, 36133, 36134, 36137, 36144, 36145, 36170, 36175, 36180, 36185, 36195, 36205, 36206, 36207, 36209, 36212, 36213, 36227, 36249, 36250, 36272, 36294, 36300, 36311, 36313, 36317, 36318, 36325, 36328, 36354, 36355, 36364, 36365, 36393, 36399, 36403, 36404, 36405, 36407, 36417, 36418, 36429, 36470, 36492, 36502, 36520, 36535, 36538, 36545, 36548, 36591, 36593, 36597, 36601, 36602, 36603, 36605, 36607, 36609, 36612, 36615, 36690, 36704, 36722, 36740, 36778, 36781, 36789, 36794, 36795, 36803, 36806, 36813, 36906, 36924, 36942, 36960, 36978, 36983, 36984, 37028, 37046, 37064, 37082, 37208, 37226, 37244, 37262, 37280, 37406, 37424, 37442, 37460, 37478, 37483, 37484, 37604, 37622, 37640, 37678, 37681, 37802, 37820, 37835, 37838, 37845, 37848, 37995, 38005, 38006, 38012, 38013, 38027, 38028, 38049, 38050, 38072, 38094, 38107, 38110, 38113, 38129, 38131, 38132, 38150, 38151, 38153, 38157, 38160, 38165, 38193, 38195, 38199, 38201, 38203, 38204, 38205, 38207, 38210, 38213, 38229, 38270, 38292, 38309, 38311, 38316, 38331, 38333, 38334, 38337, 38344, 38345, 38370, 38375, 38380, 38385, 38391, 38399, 38402, 38409, 38412, 38415, 38490, 38500, 38511, 38513, 38517, 38518, 38525, 38528, 38554, 38555, 38564, 38565, 38589, 38590, 38591, 38595, 38599, 38600, 38601, 38603, 38607, 38609, 38614, 38617, 38702, 38720, 38735, 38738, 38745, 38748, 38774, 38779, 38787, 38788, 38789, 38792, 38797, 38801, 38808, 38815, 38904, 38922, 38940, 38978, 38981, 39048, 39066, 39084, 39228, 39246, 39264, 39282, 39408, 39426, 39444, 39462, 39480, 39606, 39624, 39642, 39660, 39678, 39683, 39684, 39804, 39822, 39840, 39878, 39881

Of course, the choice of adding the odd digits and subtracting the even digits is quite arbitrary and it's perfectly acceptable to reverse this and in doing so generate a different sequence. Doing this we generate OEIS A124177:


 A124177

Consider the map \(f\) that sends \(m\) to \(m\) + (sum of even digits of \(m\)) - (sum of odd digits of \(m\) ). Sequence gives numbers \(m\) such that \(f^k(m)\) = \(m\) for some \(k\).


The initial members of this sequence are:

0, 22, 26, 27, 34, 35, 44, 49, 52, 63, 66, 78, 79, 81, 88, 99, 104, 107, 108, 112, 115, 121, 126, 133, 134, 143, 144, 151, 156, 165, 178, 187, 211, 224, 229, 232, 233, 283, 290, 314, 336, 341, 358, 363, 385, 413, 431, 467, 470, 489, 492, 516, 538, 561, 583, 615

Let's look at the first member of the sequence, 22:$$22 \rightarrow 22 + 2 + 2 =26\\26 \rightarrow 26+2+6=34\\34 \rightarrow 34 + 4 - 3 = 35\\35 \rightarrow 35-3-5=27\\27 \rightarrow 27+2-7=22$$Thus after five steps we arrive back at 22:$$22 \rightarrow 26 \rightarrow 34 \rightarrow 35 \rightarrow 27 \rightarrow 22$$It can be noted that "attractors", those numbers invariant under the mapping, remain the same but the "vorticals", those numbers that form "vortices" or loops, are different. There are 2966 members of this sequence in the range up to 40,000. For future reference, here are the members from 27326 to 40000:

27326, 27344, 27362, 27380, 27408, 27412, 27415, 27421, 27426, 27433, 27434, 27443, 27444, 27451, 27456, 27465, 27478, 27487, 27528, 27546, 27564, 27582, 27601, 27610, 27623, 27628, 27632, 27639, 27645, 27646, 27654, 27657, 27664, 27667, 27675, 27676, 27682, 27688, 27689, 27693, 27698, 27705, 27748, 27766, 27784, 27803, 27825, 27830, 27847, 27852, 27869, 27874, 27884, 27886, 27896, 27899, 27903, 27968, 27986, 28019, 28037, 28055, 28073, 28091, 28109, 28190, 28239, 28257, 28275, 28293, 28307, 28329, 28370, 28392, 28459, 28477, 28495, 28505, 28527, 28549, 28550, 28572, 28594, 28679, 28697, 28703, 28725, 28730, 28747, 28752, 28769, 28774, 28784, 28796, 28799, 28899, 28901, 28910, 28923, 28928, 28932, 28939, 28945, 28946, 28954, 28957, 28964, 28967, 28975, 28976, 28982, 28989, 28993, 28998, 29018, 29081, 29108, 29126, 29144, 29162, 29180, 29216, 29238, 29261, 29283, 29328, 29346, 29364, 29382, 29414, 29436, 29441, 29458, 29463, 29485, 29488, 29501, 29548, 29566, 29584, 29608, 29612, 29615, 29621, 29626, 29633, 29634, 29643, 29644, 29651, 29656, 29665, 29678, 29687, 29768, 29786, 29801, 29810, 29823, 29828, 29832, 29839, 29845, 29846, 29854, 29857, 29864, 29867, 29875, 29876, 29882, 29889, 29893, 29898, 29988, 30014, 30036, 30041, 30058, 30063, 30085, 30104, 30118, 30121, 30122, 30140, 30162, 30166, 30167, 30174, 30181, 30184, 30192, 30208, 30212, 30215, 30221, 30226, 30233, 30234, 30243, 30244, 30251, 30256, 30265, 30278, 30287, 30288, 30294, 30303, 30306, 30324, 30342, 30360, 30382, 30383, 30386, 30394, 30401, 30410, 30423, 30428, 30432, 30439, 30445, 30446, 30454, 30457, 30464, 30467, 30475, 30476, 30482, 30486, 30489, 30492, 30493, 30498, 30501, 30508, 30526, 30544, 30562, 30580, 30603, 30625, 30630, 30647, 30652, 30669, 30674, 30684, 30696, 30699, 30728, 30746, 30764, 30782, 30805, 30827, 30849, 30850, 30872, 30888, 30894, 30909, 30948, 30966, 30984, 31004, 31018, 31021, 31022, 31040, 31062, 31066, 31067, 31074, 31081, 31084, 31092, 31116, 31138, 31161, 31183, 31202, 31220, 31242, 31243, 31246, 31251, 31254, 31264, 31265, 31272, 31318, 31381, 31400, 31422, 31426, 31427, 31434, 31435, 31444, 31449, 31452, 31463, 31466, 31478, 31479, 31481, 31488, 31499, 31504, 31611, 31624, 31629, 31632, 31633, 31683, 31690, 31813, 31831, 31867, 31870, 31889, 31892, 32008, 32012, 32015, 32021, 32026, 32033, 32034, 32043, 32044, 32051, 32056, 32065, 32078, 32087, 32102, 32120, 32142, 32143, 32146, 32151, 32154, 32164, 32165, 32172, 32201, 32210, 32223, 32228, 32232, 32239, 32245, 32246, 32254, 32257, 32264, 32267, 32275, 32276, 32282, 32289, 32293, 32298, 32304, 32318, 32321, 32322, 32340, 32362, 32366, 32367, 32374, 32381, 32384, 32392, 32403, 32425, 32430, 32447, 32452, 32469, 32474, 32484, 32488, 32492, 32494, 32496, 32499, 32506, 32507, 32524, 32542, 32560, 32582, 32583, 32586, 32594, 32605, 32627, 32649, 32650, 32672, 32686, 32690, 32692, 32694, 32696, 32698, 32702, 32705, 32708, 32726, 32744, 32762, 32780, 32807, 32829, 32870, 32888, 32892, 32898, 32899, 32904, 32911, 32928, 32946, 32964, 32982, 33006, 33024, 33042, 33060, 33082, 33083, 33086, 33094, 33118, 33181, 33204, 33218, 33221, 33222, 33240, 33262, 33266, 33267, 33274, 33281, 33284, 33292, 33402, 33420, 33442, 33443, 33446, 33451, 33454, 33464, 33465, 33472, 33600, 33622, 33626, 33627, 33634, 33635, 33644, 33649, 33652, 33663, 33666, 33678, 33679, 33681, 33688, 33695, 33704, 33811, 33824, 33829, 33832, 33833, 33883, 33890, 34001, 34010, 34023, 34028, 34032, 34039, 34045, 34046, 34054, 34057, 34064, 34067, 34075, 34076, 34082, 34089, 34093, 34098, 34100, 34122, 34126, 34127, 34134, 34135, 34144, 34149, 34152, 34163, 34166, 34178, 34179, 34203, 34225, 34230, 34247, 34252, 34269, 34274, 34284, 34296, 34298, 34299, 34300, 34302, 34320, 34342, 34343, 34346, 34351, 34354, 34364, 34365, 34372, 34405, 34427, 34449, 34450, 34472, 34494, 34496, 34498, 34500, 34502, 34504, 34518, 34521, 34522, 34540, 34562, 34566, 34567, 34574, 34581, 34584, 34592, 34607, 34629, 34670, 34692, 34694, 34696, 34698, 34700, 34702, 34704, 34706, 34724, 34742, 34760, 34782, 34783, 34786, 34794, 34809, 34890, 34892, 34894, 34896, 34898, 34900, 34902, 34904, 34906, 34908, 34926, 34944, 34962, 34980, 35008, 35026, 35044, 35062, 35080, 35206, 35224, 35242, 35260, 35282, 35283, 35286, 35294, 35404, 35418, 35421, 35422, 35440, 35462, 35466, 35467, 35474, 35481, 35484, 35492, 35602, 35620, 35642, 35643, 35646, 35651, 35654, 35664, 35665, 35672, 35800, 35822, 35826, 35827, 35834, 35835, 35844, 35849, 35852, 35863, 35866, 35878, 35879, 35881, 35888, 35891, 35904, 36003, 36025, 36030, 36047, 36052, 36069, 36074, 36084, 36096, 36099, 36111, 36124, 36129, 36132, 36133, 36183, 36190, 36205, 36227, 36249, 36250, 36272, 36294, 36300, 36322, 36326, 36327, 36334, 36335, 36344, 36349, 36352, 36363, 36366, 36378, 36379, 36407, 36429, 36470, 36492, 36498, 36502, 36504, 36506, 36507, 36510, 36520, 36542, 36543, 36546, 36551, 36554, 36564, 36565, 36572, 36609, 36690, 36696, 36700, 36702, 36704, 36718, 36721, 36722, 36740, 36762, 36766, 36767, 36774, 36781, 36784, 36792, 36894, 36900, 36906, 36924, 36942, 36960, 36982, 36983, 36986, 36994, 37028, 37046, 37064, 37082, 37208, 37226, 37244, 37262, 37280, 37406, 37424, 37442, 37460, 37482, 37483, 37486, 37494, 37604, 37618, 37621, 37622, 37640, 37662, 37666, 37667, 37674, 37681, 37684, 37692, 37802, 37820, 37842, 37843, 37846, 37851, 37854, 37864, 37865, 37872, 38005, 38027, 38049, 38050, 38072, 38094, 38113, 38131, 38167, 38170, 38189, 38192, 38207, 38229, 38270, 38292, 38311, 38324, 38329, 38332, 38333, 38383, 38390, 38409, 38490, 38500, 38522, 38526, 38527, 38534, 38535, 38544, 38549, 38552, 38563, 38566, 38578, 38579, 38698, 38702, 38707, 38708, 38714, 38715, 38720, 38742, 38743, 38746, 38751, 38754, 38764, 38765, 38772, 38896, 38904, 38906, 38908, 38909, 38912, 38918, 38921, 38922, 38940, 38962, 38966, 38967, 38974, 38981, 38984, 38988, 38992, 39000, 39048, 39066, 39084, 39228, 39246, 39264, 39282, 39408, 39426, 39444, 39462, 39480, 39606, 39624, 39642, 39660, 39682, 39683, 39686, 39694, 39804, 39818, 39821, 39822, 39840, 39862, 39866, 39867, 39874, 39881, 39884, 39892

Wednesday, 24 January 2024

Measuring Dartsmanship

Recently I've taken to recording how many throws it takes me to complete a game of Round the World in darts. The game is quite simple: you must score a 1 before moving on to the 2, once the 2 is completed you can move on 3 and so on around the board before finishing on the red bullseye or the green ring around it. The minimum number of throws required for this feat is 21.

I decided to measure the efficiency of my score by dividing it into 21 and expressing this as a fraction. Thus: $$ \text{efficiency }=\frac{21}{\text{score}} \times 100$$Figure 1 shows a graph of the resultant efficiencies for scores ranging from 105 to 21.


Figure 1: permalink

Figure 2 shows a table of selected scores and their associated efficiencies (rounded to the nearest whole number).


Figure 2: permalink

As can be seen, it becomes increasingly difficult to achieve an efficiency close to 100%. For example, 22 scores 95% and 21 scores 91% but all other scores are under 90%. I'm recording these results in a newly created AirTable database. See Figure 3.


Figure 3

I'm keeping track of the number of throws using a counter on my iPhone. See Figure 4.


Figure 4

There is a defect of sorts in this way of measuring efficiency because it supposes that 21 steps required to finish are all equal. Indeed from 1 to 20 they are but the final bullseye and green ring have a combined area that is considerably smaller than the numbered sectors. One might complete steps 1 to 20 with 20 throws and then spend ten more throws before hitting the central area of the dartboard. The final score of 30 with result efficiency of 70% doesn't fully reward the extraordinary skill required to progress from 1 to 20 in only 20 throws.

The bull's-eye has an outerbull area (also know as the single bull, which scores 25) and an inner bull (also known as a double bull's-eye, which scores 50). The circular scoring area of the standard dartboard has a diameter of 34" and the bull's-eye has a diameter of 3". So this means that each numbered sector has an area of 45.04 square inches and the bull's-eye has an area of 7.069 square inches which is thus more than six times smaller. Hitting the bull's-eye in a single throw ought to be rewarded more than hitting one of the numbered sectors in a single throw.

Hitting the bull's-eye is equivalent to hitting six numbered sectors in succession. The numbers should range from 1 --> 20 and then from 21 --> 26 but 26 is difficult to work with. Let's go with 21 --> 25 so that the numbered sectors count for 80% and the bull's-eye 20%. If somebody hits the numbers 1 to 20 in twenty throws, they are assured of an 80% score. A formula then involves two statistics, \(x\) and \(y\) where the former represents the throws taken to traverse 1 to 20 and the latter represents the throws needed to hit the bull's-eye. The formula thus becomes:$$\text{efficiency }=\frac{20}{x} \times 80 + \frac{1}{y} \times 20$$This is a fairer estimate of efficiency that doesn't unduly penalise somebody for having difficulty hitting the bull's-eye. I've changed my AirTable database to reflect these changes.

ADDENDUM: March 6th 2024

There's a major problem with this final efficiency formula that I came up with and I only noticed it today. Recently, on February 26th, I achieved an efficiency of 62% after scoring 41 in the 1 to 20 section and 1 in the bull's-eye:$$ \text{efficiency } =\frac{20}{40} \times 80 + \frac{1}{1} \times 20  \approx 62.0 \%$$Today I needed 41 for the 1 to 20 section but needed two throws to get the bull's-eye. However, I was shocked to see that my efficiency was 10% less as the result of the calculation:$$ \text{efficiency } =\frac{20}{41} \times 80 + \frac{1}{2} \times 20  \approx 52.0 \%$$This is clearly not reasonable but the problem only emerged as the consistency of my dart throwing improved.

For the time being, I'll revert to my original formula:
$$ \text{efficiency }=\frac{21}{\text{score}} \times 100$$This then produces more reasonable results:$$ \text{efficiency }=\frac{21}{41} \times 100 \approx 51.2 \%$$$$ \text{efficiency }=\frac{21}{43} \times 100 \approx 48.8 \%$$This formula is far from perfect but it will have to do for the time being until I come up with something better.

Sunday, 21 January 2024

One of a Kind?

Consider all the natural numbers up to one million and ask the following question:

What numbers are comprised of the same set of digits as comprise its prime factors? It turns out that 132 is the first such number:$$ \begin{align} 132 &= 2^2 \times 3 \times 11 \\ \{1, 2, 3 \} &= \{1, 2, 3 \} \end{align} $$The second such number is 312:$$ \begin{align} 312 &= 2^3 \times 3 \times 13 \\ \{1, 2, 3 \} &= \{1, 2, 3\} \end{align} $$The third such number is 735:$$ \begin{align} 735 &= 3 \times 5 \times 7^2 \\  \{3, 5, 7\} &= \{3, 5, 7\} \end{align} $$It can be noted that 735 is unique (at least up to one million) in that its factors are single digits and thus none need to be broken down further.

These types of numbers comprise OEIS A035141:


 A035141

Composite numbers \(k\) such that digits in \(k\) and in juxtaposition of prime factors of \(k \) are the same (apart from multiplicity).


There are 96 such numbers in the range up to 40,000:

132, 312, 735, 1255, 1377, 1775, 1972, 3792, 4371, 4773, 5192, 6769, 7112, 7236, 7371, 7539, 9321, 11009, 11099, 11132, 11163, 11232, 11255, 11375, 11913, 12176, 12326, 12595, 12955, 13092, 13175, 13312, 13377, 13491, 13755, 14842, 15033, 15303, 15317, 15532, 16332, 17272, 17276, 17343, 17482, 17973, 17975, 19075, 19276, 20530, 21345, 21372, 22413, 22714, 23535, 24338, 25030, 25105, 27232, 27393, 27944, 31007, 31317, 31419, 31479, 31503, 31592, 31722, 31977, 32024, 32104, 32145, 32612, 32973, 33011, 33327, 33781, 33925, 34112, 34997, 35213, 35262, 35722, 36882, 37115, 37127, 37317, 37359, 37522, 37662, 37741, 37791, 37921, 38385, 39172, 39795

However, it can be restated that 735 is very special, if not unique, because its prime factors (without multiplicity) of 3, 5 and 7 are the same as the digits of the number.

Fibodiv Numbers

My diurnal age today is 27321 and I was struggling to find an interesting sequence to which this number belonged. Fortunately, Numbers Aplenty came to my aid with the information that 27321 is a fibodiv number. Such numbers are few and far between. Here's the definition that is provided by the described source:

These are numbers \(n\)  whose representation can be split into two numbers, say \(a\) and  \(b\), such that the Fibonacci-like sequence which uses \(a\) and \(b\) as seeds contains \(n\)  itself.

 In the case of 27321, it can be seen that this is indeed the case:

273, 21, 294, 315, 609, 924, 1533, 2457, 3990, 6447, 10437, 16884, 27321

The sequence of such numbers can be found in the OEIS A130792 but they are not referred to as fibodiv numbers. 


 A130792

Numbers \(n\) whose representation can be split in two parts which can be used as seeds for a Fibonacci-like sequence containing \(n\) itself.


The initial members are:

14, 19, 28, 47, 61, 75, 122, 149, 183, 199, 244, 298, 305, 323, 366, 427, 488, 497, 549, 646, 795, 911, 969, 1292, 1301, 1499, 1822, 1999, 2087, 2602, 2733, 2998, 3089, 3248, 3379, 3644, 3903, 4555, 4997, 5204, 5466, 6178, 6377, 6496, 6505, 7288, 7806, 7995 

Between 20,000 and 40,000, the numbers are:

19999, 20816, 20987, 21623, 22117, 23418, 24712, 24719, 26020, 27321, 27483, 27801, 28622, 29107, 29923, 29998, 30890, 31224, 32498, 32525, 33826, 33979, 35127, 36428, 36644, 37729, 39030

As can be seen, there's quite a gap between 27321 and the previous sequence member, 26020, but the subsequent member, 27483, is much closer. All the numbers in the sequence admit of only one concatenation and it is not known if there are numbers that admit of more than one.

The sequence is infinite since 19 with seeds 1 and 9, 199 with seeds 1 and 99, 1999 with seeds 1 and 999, 19999 with seeds 1 and 9999 and so on are in the sequence. For example:

1, 9999, 10000, 19999

It's easy enough to confirm that a number is a fibodiv (see permalink) but finding them initially is more challenging. However, OEIS comments list a method but I don't quite understand it.

Friday, 19 January 2024

Yet Another Type of Prime

Before we delve into the world of prime numbers, we firstly need to consider a special type of number or rather two types of numbers that are similar and yet distinct:

  • numbers that are the sum of the \(n\)-th prime and the \(n\)-th non-prime number
  • numbers that are the sum of the \(n\)-th prime and the \(n\)-th composite number
The first non-prime numbers is 1 while the first composite number is 4. All other non-prime and composite numbers are the same but the different starting points produce two different sequences, one beginning with 1 + 2 = 3 and the other beginning with 4 + 2 = 6:
  • 3, 7, 11, 15, 20, 23, 29, 33, 38, 45, 49, 57, 62, 65, 71, 78, 85, 88, 95, ... OEIS  A064799
  • 6, 9, 13, 16, 21, 25, 31, 34, 39, 47, 51, 58, 63, 67, 72, 79, 86, 89, 97, ... OEIS  A064799
The primes we are interested in are those primes to be found in these two sequences. The first is OEIS A097452:


 A097452

Primes of the form prime(\(n\)) + nonprime(\(n\)) for some \(n\). 



Up to 40,000, there are 484 of these types of primes (see Bespoken for Sequences entry):

3, 7, 11, 23, 29, 71, 101, 139, 151, 157, 199, 229, 239, 251, 263, 311, 347, 367, 401, 443, 479, 547, 601, 653, 673, 691, 709, 853, 977, 991, 1013, 1051, 1087, 1181, 1237, 1291, 1327, 1451, 1487, 1579, 1637, 1693, 1721, 1753, 1777, 1861, 1877, 1913, 1951, 2029, 2087, 2161, 2237, 2251, 2297, 2351, 2381, 2543, 2557, 2657, 2683, 2767, 2777, 2791, 2897, 3011, 3079, 3121, 3169, 3209, 3221, 3299, 3413, 3461, 3499, 3571, 3623, 3631, 3719, 3739, 3779, 3823, 3919, 4021, 4129, 4231, 4253, 4297, 4327, 4409, 4421, 4483, 4507, 4547, 4567, 4583, 4637, 4673, 4733, 4801, 4937, 4951, 4973, 4987, 5087, 5399, 5743, 5807, 5813, 5821, 5923, 6047, 6067, 6269, 6277, 6343, 6353, 6451, 6551, 6733, 6997, 7019, 7027, 7457, 7481, 7589, 7829, 7841, 7877, 8111, 8297, 8317, 8539, 8627, 8647, 8681, 8693, 8707, 8737, 8747, 8929, 8999, 9013, 9067, 9293, 9319, 9337, 9397, 9419, 9439, 9473, 9887, 9949, 10009, 10037, 10067, 10301, 10333, 10343, 10391, 10487, 10589, 10663, 10691, 10853, 10861, 10993, 11057, 11117, 11177, 11197, 11213, 11239, 11317, 11351, 11527, 11681, 11701, 11867, 11971, 12011, 12143, 12281, 12527, 12589, 12899, 12983, 13033, 13367, 13513, 13523, 13553, 13619, 13627, 13691, 13831, 13931, 13999, 14029, 14153, 14177, 14251, 14327, 14537, 14557, 14723, 14783, 14867, 14879, 14939, 14951, 15107, 15173, 15193, 15199, 15289, 15473, 15601, 15647, 15733, 15907, 16067, 16111, 16223, 16301, 16567, 16573, 16693, 16741, 16747, 16763, 16811, 16931, 16987, 17033, 17099, 17123, 17327, 17389, 17419, 17471, 17509, 17627, 17707, 17791, 17839, 17939, 17959, 17989, 18191, 18397, 18691, 18719, 18803, 18919, 18959, 18973, 19013, 19219, 19423, 19441, 19559, 19681, 19751, 19861, 19919, 20101, 20143, 20287, 20333, 20509, 20681, 20749, 20807, 20903, 20939, 21179, 21283, 21317, 21433, 21499, 21529, 21563, 21757, 21773, 21851, 22003, 22039, 22063, 22123, 22307, 22381, 22469, 22573, 22613, 22697, 22777, 22807, 22853, 23011, 23027, 23063, 23143, 23189, 23311, 23447, 23497, 23531, 23603, 23627, 23801, 23833, 23899, 23981, 24001, 24121, 24421, 24439, 24623, 24631, 24659, 24923, 24953, 25057, 25097, 25229, 25309, 25589, 25673, 25763, 25951, 25997, 26029, 26041, 26111, 26209, 26227, 26297, 26321, 26641, 26903, 26927, 26993, 27011, 27091, 27427, 27509, 27697, 27809, 27851, 27953, 28051, 28123, 28297, 28351, 28547, 28571, 28591, 28597, 28687, 28837, 29063, 29327, 29333, 29363, 29389, 29437, 29581, 29629, 29683, 29761, 29863, 30047, 30091, 30109, 30307, 30391, 30509, 30517, 30529, 30557, 30661, 30911, 30971, 31081, 31159, 31259, 31267, 31387, 31517, 31573, 31643, 32003, 32063, 32117, 32143, 32159, 32183, 32251, 32401, 32579, 32587, 32611, 32801, 33013, 33037, 33053, 33091, 33161, 33403, 33413, 33461, 33487, 33619, 33641, 33679, 33751, 33923, 33997, 34019, 34039, 34157, 34217, 34367, 34487, 34511, 34613, 34687, 34913, 35089, 35153, 35281, 35327, 35401, 35447, 35617, 35759, 35831, 36011, 36037, 36083, 36187, 36263, 36313, 36343, 36467, 36541, 36587, 36683, 36787, 36821, 36913, 36923, 36997, 37117, 37181, 37337, 37483, 37537, 37643, 37663, 37691, 37799, 37861, 37897, 37957, 37991, 38351, 38453, 38501, 38543, 38569, 38639, 38821, 38873, 39019, 39113, 39157, 39229, 39607, 39631, 39821, 39883, 39953

An example is 27427 = 3146 + 24281 which is the sum of the 2700-th non-prime and prime numbers. The second sequence of primes is OEIS A111489:


 A111489

Primes of the form prime(\(n\)) + composite(\(n\)) for some \(n\). 



Up to 40,000, there are 447 such primes (see Bespoken for Sequences entry):

13, 31, 47, 67, 79, 89, 97, 103, 113, 149, 173, 179, 211, 223, 241, 277, 313, 349, 359, 379, 449, 457, 487, 503, 509, 631, 743, 769, 797, 809, 887, 937, 967, 1009, 1049, 1109, 1123, 1213, 1231, 1277, 1289, 1319, 1409, 1429, 1453, 1471, 1489, 1543, 1571, 1663, 1709, 1747, 1789, 1801, 1879, 1999, 2081, 2137, 2377, 2383, 2399, 2411, 2459, 2531, 2539, 2617, 2633, 2687, 2693, 2819, 2843, 2927, 2999, 3023, 3089, 3203, 3301, 3347, 3449, 3463, 3529, 3557, 3733, 3821, 3877, 3907, 4001, 4057, 4111, 4133, 4261, 4363, 4423, 4451, 4519, 4549, 4691, 4759, 4789, 4877, 4903, 4999, 5081, 5099, 5119, 5413, 5441, 5449, 5563, 5651, 5669, 5737, 5779, 5801, 5839, 5869, 5897, 5903, 5927, 6073, 6247, 6271, 6299, 6311, 6359, 6379, 6473, 6571, 6607, 6619, 6653, 6719, 6763, 6791, 6977, 7129, 7243, 7253, 7321, 7477, 7583, 7591, 7691, 7741, 7883, 7933, 7949, 8171, 8291, 8329, 8429, 8521, 8731, 8761, 8839, 8969, 9007, 9041, 9103, 9137, 9151, 9281, 9311, 9371, 9421, 9631, 9689, 9767, 9967, 9973, 10039, 10069, 10093, 10181, 10211, 10271, 10337, 10369, 10457, 10781, 10799, 10831, 10889, 10957, 11171, 11257, 11353, 11399, 11549, 11587, 11617, 11807, 11827, 12041, 12239, 12329, 12401, 12437, 12517, 12647, 12689, 12763, 12781, 12853, 12893, 12923, 13001, 13109, 13127, 13151, 13177, 13241, 13339, 13451, 13751, 13873, 14143, 14197, 14243, 14321, 14369, 14423, 14437, 14519, 14543, 14629, 14639, 14653, 14831, 14843, 14887, 15013, 15161, 15241, 15277, 15349, 15377, 15641, 15671, 15791, 15877, 15913, 15959, 16139, 16447, 16561, 16649, 16661, 16879, 16901, 16921, 16981, 17021, 17167, 17291, 17321, 17393, 17489, 17623, 17789, 17981, 18089, 18181, 18199, 18251, 18287, 18307, 18401, 18439, 18593, 18671, 18797, 18859, 18913, 19001, 19213, 19289, 19333, 19391, 19457, 19489, 19753, 20129, 20269, 20323, 20411, 20479, 20593, 20627, 20639, 20747, 20809, 21013, 21089, 21193, 21617, 21683, 21767, 21787, 21991, 22013, 22091, 22157, 22369, 22397, 22481, 22621, 22637, 22669, 22679, 23029, 23053, 23333, 23629, 23677, 23719, 23743, 23831, 24113, 24593, 24733, 24917, 24989, 25189, 25321, 25423, 25453, 25609, 25639, 25759, 25841, 25933, 26099, 26309, 26371, 26561, 26591, 26627, 26699, 26821, 26891, 26953, 26987, 27239, 27253, 27271, 27337, 27397, 27487, 27631, 27883, 28019, 28081, 28387, 28559, 28573, 28627, 28817, 29059, 29179, 29251, 29527, 29717, 29803, 29819, 30071, 30137, 30203, 30389, 30677, 30707, 30841, 30893, 30937, 31039, 31051, 31121, 31153, 31181, 31247, 31271, 31319, 31327, 31333, 31357, 31489, 31511, 31583, 31721, 31859, 31873, 31907, 32257, 32321, 32369, 32467, 32779, 33071, 33347, 33427, 33469, 33587, 33713, 33871, 34127, 34267, 34313, 34501, 34519, 34607, 34781, 34981, 35083, 35171, 35323, 35491, 35531, 35993, 36061, 36161, 36277, 36583, 36629, 36637, 36697, 36761, 36791, 36877, 36929, 37223, 37339, 37423, 37447, 37489, 37907, 38153, 38449, 38693, 38723, 38959, 39161, 39191, 39503, 39619, 39667, 39727, 39887

An example is 27337 = 3140 + 24197 which is the sum of the 2693-th composite and prime numbers. One could take things a step further for these two sequences and consider only members of the sequence for \(n\) prime. Thus only the 2nd, 3rd, 5th, 7th, 11th and so on sequence members would appear. Consider the following sequence (not in the OEIS) and accompanying table.

Primes of the form prime(\(n\)) + composite(\(n\)) for \(n\) prime. 

Saturday, 13 January 2024

Amicable Tuples

When I think of amicable numbers, a pair of numbers come to mind: 220 and 284. They have the property that the sum of the proper divisors of 220 equals 284 and vice versa. This is an example of an amicable 2-tuple. The relationship between 220 and 284 can be expressed as:$$ \sigma_1(220)=\sigma_1(284)=220+284$$This means that any amicable 2-tuple, let's say \( (x, y) \), has the property that:$$ \sigma_1(x)=\sigma_1(y)=x+y $$The next amicable pair or 2-tuple is (1184, 1210). A list of numbers that form amicable pairs is given by OEIS A063990:


 A063990

Amicable numbers.   
                                 


The initial members are:

220, 284, 1184, 1210, 2620, 2924, 5020, 5564, 6232, 6368, 10744, 10856, 12285, 14595, 17296, 18416, 63020, 66928, 66992, 67095, 69615, 71145, 76084, 79750, 87633, 88730, 100485, 122265, 122368, 123152, 124155, 139815, 141664, 142310

The sequence lists the amicable numbers in increasing order. Note that the pairs \( (x, y) \) are not necessarily adjacent to each other in the list. The first time a pair ordered by its first element is not adjacent is \(x\) = 63020, \(y\) = 76084 which correspond to a(17) and a(23), respectively.

This leads us on to amicable 3-tuples, \( (x, y,z) \), that have the property:$$ \sigma_1(x)= \sigma_1(y)= \sigma_1(z)=x+y+z$$The first amicable triple or 3-tuple is (1980, 2016, 2556). My diurnal age today, 27312, is part of the amicable 3-tuple (27312, 21168, 22200).  In general, we can call a finite set \( (x_1, x_2, \dots, x_k) \) of natural numbers (the \(x_i\) are pairwise distinct), an amicable \(k\)-tuple iff$$  \sigma_1(x_1)= \sigma_1(x_2)=\dots =\sigma_1(x_k)=x_1+x_2+...+x_k $$For \(k\)=1, the only possible amicable one-tuple is (1).

OEIS A255215 lists numbers that belong to at least one amicable tuple and the initial members are:

1, 220, 284, 1184, 1210, 1980, 2016, 2556, 2620, 2924, 5020, 5564, 6232, 6368, 9180, 9504, 10744, 10856, 11556, 12285, 14595, 17296, 18416, 21168, 22200, 23940, 27312, 31284, 32136, 37380, 38940, 39480, 40068, 40608, 41412, 41952, 42168, 43890, 46368, 47124

Tuesday, 9 January 2024

The Sesquinary Number Base

"Sesqui" in Latin means "one and a half" and so the sesquinary number base uses 3/2 as its base. It can also be called fractional base 3/2. The numbers formed using this base comprise OEIS A024629:


 A024629

\(n\) written in fractional base 3/2.     
                          


The initial members of the sequence are:

0, 1, 2, 20, 21, 22, 210, 211, 212, 2100, 2101, 2102, 2120, 2121, 2122, 21010, 21011, 21012, 21200, 21201, 21202, 21220, 21221, 21222, 210110, 210111, 210112, 212000, 212001, 212002, 212020, 212021, 212022, 212210, 212211, 212212, 2101100, 2101101

Figure 1 shows the results more clearly for the numbers 1 to 15:


Figure 1: source

In general, for bases of the form \(a/b\) where \(a\) and \(b\) are integers and \(a \gt b \), the digits that can used range from \( 0\) to \(a-1\) and so for the sesquinary number base the digits 0, 1 and 2 are used. If \(a \lt b \) then the digits \(0\) to \(b-1\) are used.

Let's use \(22_{3/2}\) as our first example. This should be the same as \(5_{10} \) and indeed we see that it is:$$  22_{3/2} = 2 \times \frac{3}{2} + 2 =3+2 = 5$$Let's used \(2101_{3/2}\) as a second example. This should be equal to \(10_{10} \):$$ \begin{align}  2101_{3/2} &=  2 \times \bigg ( \frac{3}{2} \bigg )^3+ \bigg ( \frac{3}{2} \bigg )^2+0+1 \\ &= \frac{27}{4}+ \frac{9}{4} +1\\ &=10 \end{align} $$The following SageMath code will generate the first 40 numbers (permalink):
def basepqExpansion(p, q, n):
    L, i = [n], 1
    while L[i-1] >= p:
        x=L[i-1]
        L[i-1]=x.mod(p)
        L.append(q*(x//p))
        i+=1
    L.reverse()
    return Integer(''.join(str(x) for x in L))
L=[basepqExpansion(3, 2, n) for n in [0..40]]
print(L)

 I came across this number base in the context of OEIS A081848:


 A081848

Number of numbers whose base-3/2 expansion (see A024629) has \(n\) digits. 

The initial members of the sequence are (permalink accurate to 5394):

 3, 3, 3, 6, 9, 12, 18, 27, 42, 63, 93, 141, 210, 315, 474, 711, 1065, 1599, 2397, 3597, 5394, 8091, 12138, 18207, 27309

My diurnal age on the date of this post is 27309 and this is how many numbers in base 3/2 has \(n\) = 25 digits. This YouTube video gives a good overview of the different sorts of bases that are possible including negative, algebraic, imaginary and complex number bases. Figure 2 shows a screenshot of the opening frame.


Figure 2: source

Here is another very interesting link titled How Do You Write One Hundred in Base 3/2? Here is an excerpt:

Here’s a problem that I think is hard but might be doable: how many counting numbers are there that have a sesquinary representation that (if we ignore the 0‘s at the front) reads the same forward and backward? (It’s easy to write down palindromic sequences of 0‘s, 1‘s and 2‘s, but the overwhelming majority of them, like 11, don’t correspond to counting numbers.) The biggest sesquinary palindrome I know is four hundred ninety-four, with sesquinary representation 2120010100212. Are there others? Are there perhaps infinitely many others? 

ADDENDUM

Well, 3/2 turned up the very next day, associated with one of the properties of 27310 that turns out to be a member of OEIS A061418:


 A061418

a(\(n\)) = floor(a(\(n\)-1)*3/2) with a(1) = 2.                               



The OEIS comments are particularly interesting:
Can be stated as the number of animals starting from a single pair if any pair of animals can produce a single offspring (as in the game Minecraft, if the player allows offspring to fully grow before breeding again). 

The sequence members are almost identical to those of OEIS A024629 (differences are shown in bold and all differ by being 1 more except for the first member which is 1 less):

2, 3, 4, 6, 9, 13, 19, 28, 42, 63, 94, 141, 211, 316, 474, 711, 1066, 1599, 2398, 3597, 5395, 8092, 12138, 18207, 27310

Here are the members of OEIS A024629 again for easy reference.

3, 3, 3, 6, 9, 12, 18, 27, 42, 63, 93, 141, 210, 315, 474, 711, 1065, 1599, 2397, 3597, 5394, 8091, 12138, 18207, 27309

Friday, 5 January 2024

Generalised Jacobsthal numbers.


Ernst Jacobsthal
(1882 - 1965)

The number associated with my diurnal age today, 27305, has the property that it is a member of OEIS A084640:

 
 A084640

Generalised Jacobsthal numbers.


There's not a great deal of information given about Jacobsthal numbers of any sort so I did some investigation which yielded the following information.

Fibonacci Numbers:$$F_n=F_{n-1}+F_{n-2}\\ \text{where }n \geq 2, F_0=0, F_1=1$$The first 25 members of this sequence are:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393

Lucus Number:$$L_n=L_{n-1}+L_{n-2} \\ \text{where } n \geq 2, L_0=2, L_1=1$$

The first 25 members of this sequence are:

2, 1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322, 521, 843, 1364, 2207, 3571, 5778, 9349, 15127, 24476, 39603, 64079, 103682, 167761, 271443

Pell Numbers:$$P_n=2P_{n-1}+P_{n-2} \\ \text{where } n \geq 2, P_0=0, P_1=1 $$The first 25 members of this sequence are:

0, 1, 2, 5, 12, 29, 70, 169, 408, 985, 2378, 5741, 13860, 33461, 80782, 195025, 470832, 1136689, 2744210, 6625109, 15994428, 38613965, 93222358, 225058681, 543339720, 1311738121, 3166815962

Pell-Lucus Numbers:$$Q_n=2Q_{n-1}+Q_{n-2} \\ \text{where } n \geq 2, Q_0=Q_1=1$$The first 25 members of this sequence are:

1, 1, 3, 7, 17, 41, 99, 239, 577, 1393, 3363, 8119, 19601, 47321, 114243, 275807, 665857, 1607521, 3880899, 9369319, 22619537, 54608393, 131836323, 318281039, 768398401, 1855077841, 4478554083

Jacobsthal Numbers:$$J_n=J_{n-1}+2J_{n-2} \\ \text{where } n \geq 2, J_0=0, J_1=1 $$The first 25 members of this sequence are:

0, 1, 1, 3, 5, 11, 21, 43, 85, 171, 341, 683, 1365, 2731, 5461, 10923, 21845, 43691, 87381, 174763, 349525, 699051, 1398101, 2796203, 5592405, 11184811, 22369621

Jacobsthal-Lucas Numbers:$$ j_n=j_{n-1}+2j_{n-2} \\ \text{where } n \geq 2, j_0=j_1=2$$The first 25 members of this sequence are:

2, 2, 6, 10, 22, 42, 86, 170, 342, 682, 1366, 2730, 5462, 10922, 21846, 43690, 87382, 174762, 349526, 699050, 1398102, 2796202, 5592406, 11184810, 22369622, 44739242, 89478486

Thus the generalised Jacobsthal numbers referenced in OEIS A084640 arise by simply adding a constant to the formula for the Jacobsthal numbers shown earlier. The formula thus becomes:

An Example of Generalised Jacobsthal Numbers:$$J^{*}_n=J^{*}_{n-1}+J^{*}_{n-2}+4 \\ \text{where } n \geq 2, J^{*}_0=0, J^{*}_1=1$$The first 25 members of this sequence are (permalink):

0, 1, 5, 11, 25, 51, 105, 211, 425, 851, 1705, 3411, 6825, 13651, 27305, 54611, 109225, 218451, 436905, 873811, 1747625, 3495251, 6990505, 13981011, 27962025, 55924051, 111848105

The generating function is given by:$$ \frac{x(1+3x)}{(1-x^2)(1-2x)}$$The \(n\)-th term is given by:$$ \frac{(5 \times 2^n + (-1)^n - 6)}{3}$$All this doesn't tell us anything about the mathematician Jacobsthal and there's an interesting remark by Donald Knuth in the OEIS comments:

Don Knuth points out (personal communication) that Jacobsthal may never have seen the actual values of his sequence. However, Horadam uses the name "Jacobsthal sequence", such an important sequence needs a name, and there is a law that says the name for something should never be that of its discoverer. 
N. J. A. Sloane, Dec 26 2020

There is a biography of Ernst Jacobsthal to be found at MacTutor

Monday, 1 January 2024

Unitary Harmonic Numbers

As I'm creating this post it is the first day of 2024 but on the last day of 2023, I came across the term Unitary Harmonic Number for the first time. This is not surprising as they are quite rare. The initial numbers, up to 40000, are 1, 6, 45, 60, 90, 420, 630, 1512, 3780, 5460, 7560, 8190, 9100, 15925, 16632, 27300 and 31500. Yesterday, my diurnal age was 27300 which is why the term came to my attention.

A unitary harmonic number is defined as a number whose unitary divisors have a harmonic mean that is an integer. This is clearly not often the case. Let's take the number 12. It has divisors of 1, 2, 3, 4, 6 and 12. Of these, only 1, 3, 4 and 12 are unitary divisors. Let's recall that a unitary divisor of a number is a divisor such that, when divided into the number, the result is a number that has no factors in common with the divisor. For example, 2 divides into 12 to give 6 but 6 and 2 have 2 as a common factor and so 2 is not a unitary divisor. 3 however divides into 12 to give 4. 3 and 4 have no common factor and so 3 is a unitary divisor. 

Let's look at 27300. It has the following divisors:

1, 2, 3, 4, 5, 6, 7, 10, 12, 13, 14, 15, 20, 21, 25, 26, 28, 30, 35, 39, 42, 50, 52, 60, 65, 70, 75, 78, 84, 91, 100, 105, 130, 140, 150, 156, 175, 182, 195, 210, 260, 273, 300, 325, 350, 364, 390, 420, 455, 525, 546, 650, 700, 780, 910, 975, 1050, 1092, 1300, 1365, 1820, 1950, 2100, 2275, 2730, 3900, 4550, 5460, 6825, 9100, 13650, 27300

There are 32 unitary divisors of 27300 and they are:

1, 3, 4, 7, 12, 13, 21, 25, 28, 39, 52, 75, 84, 91, 100, 156, 175, 273, 300, 325, 364, 525, 700, 975, 1092, 1300, 2100, 2275, 3900, 6825, 9100, 27300

The harmonic mean of a set of numbers is defined as the reciprocal of the average of the reciprocals of the numbers. The sum of the 32 reciprocals of the unitary divisors is 32/15 and thus their average is 1/15 which becomes 15 when we consider the reciprocal. Numbers like 27300 comprise OEIS A006086 (permalink):


 A006086

Unitary harmonic numbers (those for which the unitary harmonic mean is an integer).



The next unitary harmonic number will occur when I'm 31500 days old which I may or may not be around to celebrate. For posts relating to the harmonic mean see Reciprocals of Primes and Root-Mean-Square And Other Means.