Showing posts with label Bespoken for Sequences. Show all posts
Showing posts with label Bespoken for Sequences. Show all posts

Wednesday, 9 August 2023

Gray Code to the Rescue

Try as I might to find something interesting about the numerical properties of 27155, the number associated with my diurnal age yesterday, I couldn't. I looked through all my usual sources and spent quite time wracking my brain. Eventually I focused on the number's Gray Code. Follow the link for more information.

Because there is a 1-to-1 correspondence between a number and its Gray Code, I thought I'd look at the absolute value of the difference between the two. In the case of 27155, its Gray Code is 24346 and the difference is 2809. Fortunately, this number happens to be a perfect square \(53^2\). How often is this difference a perfect square was the next question that I asked myself.

It turns out that there are 359 such numbers in the range up to 40000. This represents 0.8975% of the range and so such numbers are relatively rare. Here is the list:

1, 2, 3, 6, 8, 9, 18, 24, 25, 32, 33, 47, 51, 54, 72, 73, 79, 96, 97, 128, 129, 159, 162, 211, 214, 216, 217, 227, 230, 271, 288, 289, 306, 338, 384, 385, 419, 422, 512, 513, 575, 578, 648, 649, 703, 706, 751, 787, 790, 856, 857, 864, 865, 883, 886, 920, 921, 1058, 1119, 1152, 1153, 1224, 1225, 1311, 1352, 1353, 1378, 1423, 1458, 1490, 1536, 1537, 1603, 1606, 1688, 1689, 1731, 1734, 1779, 1782, 1827, 1830, 1971, 1974, 2048, 2049, 2175, 2178, 2312, 2313, 2431, 2434, 2592, 2593, 2824, 2825, 3160, 3161, 3171, 3174, 3219, 3222, 3424, 3425, 3456, 3457, 3544, 3545, 3680, 3681, 3763, 3766, 3939, 3942, 3987, 3990, 4083, 4086, 4207, 4232, 4233, 4306, 4418, 4608, 4609, 4896, 4897, 5202, 5408, 5409, 5512, 5513, 5570, 5775, 5810, 5832, 5833, 5960, 5961, 6002, 6034, 6063, 6144, 6145, 6275, 6278, 6424, 6425, 6531, 6534, 6739, 6742, 6752, 6753, 6936, 6937, 7128, 7129, 7283, 7286, 7320, 7321, 7491, 7494, 7843, 7846, 7896, 7897, 7987, 7990, 8192, 8193, 8447, 8450, 8712, 8713, 8959, 8962, 9248, 9249, 9551, 9736, 9737, 10063, 10143, 10368, 10369, 10466, 10655, 10975, 11296, 11297, 11506, 11538, 11567, 11791, 11826, 12095, 12223, 12640, 12641, 12696, 12697, 12739, 12742, 12888, 12889, 13347, 13350, 13651, 13654, 13696, 13697, 13824, 13825, 14176, 14177, 14307, 14310, 14499, 14502, 14720, 14721, 14819, 14822, 15064, 15065, 15768, 15769, 15859, 15862, 15960, 15961, 16344, 16345, 16754, 16928, 16929, 17224, 17225, 17672, 17673, 17810, 17839, 17951, 18018, 18210, 18271, 18432, 18433, 19071, 19327, 19584, 19585, 20079, 20178, 20290, 20418, 20594, 20687, 20808, 20809, 21632, 21633, 22048, 22049, 22280, 22281, 22402, 22671, 22706, 23240, 23241, 23328, 23329, 23567, 23602, 23840, 23841, 24008, 24009, 24136, 24137, 24306, 24338, 24367, 24576, 24577, 24835, 24838, 25112, 25113, 25347, 25350, 25696, 25697, 26136, 26137, 26968, 26969, 27008, 27009, 27155, 27158, 27603, 27606, 27744, 27745, 27955, 27958, 28115, 28118, 28512, 28513, 28755, 28758, 29144, 29145, 29280, 29281, 29976, 29977, 30131, 30134, 31091, 31094, 31384, 31385, 31584, 31585, 31960, 31961, 32307, 32310, 32768, 32769, 33279, 33282, 33800, 33801, 34303, 34306, 34848, 34849, 35407, 35848, 35849, 36431, 36992, 36993, 37346, 37538, 38367, 38559, 38944, 38945, 39410, 39442, 39471

Looking at the numbers in this list, it is apparent that many of them occur in pairs or separated by 3. For example, the next number after 27155 is 27158 which has to do with the changing of the binary digits. I've added this sequence of numbers to my Bespoken for Sequences database as S085:

A variation on this idea is to consider those numbers whose difference with their Gray Code equivalents is a cube. There are 82 such numbers in the range up 40000. I've added this sequence of numbers to my Bespoken for Sequences database as S087:

The list is:

1, 2, 3, 6, 16, 17, 48, 49, 78, 91, 128, 129, 202, 215, 254, 263, 282, 384, 385, 624, 625, 779, 1024, 1025, 1616, 1617, 1775, 2032, 2033, 2256, 2257, 2718, 3072, 3073, 3410, 3706, 4394, 4855, 4992, 4993, 6739, 6742, 7079, 7903, 8192, 8193, 10722, 11747, 11750, 12928, 12929, 13115, 13166, 15850, 16256, 16257, 18048, 18049, 18618, 20091, 21744, 21745, 22503, 23470, 24223, 24576, 24577, 26531, 26534, 27280, 27281, 27554, 29648, 29649, 32307, 32310, 35152, 35153, 39442, 39471, 39936, 39937

The numbers together with their Gray Code equivalents, differences and cube root of differences are shown below:

[(1, 1, 0, 0), (2, 3, 1, 1), (3, 2, 1, 1), (6, 5, 1, 1), (16, 24, 8, 2), (17, 25, 8, 2), (48, 40, 8, 2), (49, 41, 8, 2), (78, 105, 27, 3), (91, 118, 27, 3), (128, 192, 64, 4), (129, 193, 64, 4), (202, 175, 27, 3), (215, 188, 27, 3), (254, 129, 125, 5), (263, 388, 125, 5), (282, 407, 125, 5), (384, 320, 64, 4), (385, 321, 64, 4), (624, 840, 216, 6), (625, 841, 216, 6), (779, 654, 125, 5), (1024, 1536, 512, 8), (1025, 1537, 512, 8), (1616, 1400, 216, 6), (1617, 1401, 216, 6), (1775, 1432, 343, 7), (2032, 1032, 1000, 10), (2033, 1033, 1000, 10), (2256, 3256, 1000, 10), (2257, 3257, 1000, 10), (2718, 4049, 1331, 11), (3072, 2560, 512, 8), (3073, 2561, 512, 8), (3410, 3067, 343, 7), (3706, 2375, 1331, 11), (4394, 6591, 2197, 13), (4855, 7052, 2197, 13), (4992, 6720, 1728, 12), (4993, 6721, 1728, 12), (6739, 6010, 729, 9), (6742, 6013, 729, 9), (7079, 5748, 1331, 11), (7903, 4528, 3375, 15), (8192, 12288, 4096, 16), (8193, 12289, 4096, 16), (10722, 15635, 4913, 17), (11747, 15122, 3375, 15), (11750, 15125, 3375, 15), (12928, 11200, 1728, 12), (12929, 11201, 1728, 12), (13115, 10918, 2197, 13), (13166, 10969, 2197, 13), (15850, 8991, 6859, 19), (16256, 8256, 8000, 20), (16257, 8257, 8000, 20), (18048, 26048, 8000, 20), (18049, 26049, 8000, 20), (18618, 27879, 9261, 21), (20091, 26950, 6859, 19), (21744, 32392, 10648, 22), (21745, 32393, 10648, 22), (22503, 31764, 9261, 21), (23470, 30329, 6859, 19), (24223, 29136, 4913, 17), (24576, 20480, 4096, 16), (24577, 20481, 4096, 16), (26531, 21618, 4913, 17), (26534, 21621, 4913, 17), (27280, 24536, 2744, 14), (27281, 24537, 2744, 14), (27554, 24179, 3375, 15), (29648, 19000, 10648, 22), (29649, 19001, 10648, 22), (32307, 16682, 15625, 25), (32310, 16685, 15625, 25), (35152, 52728, 17576, 26), (35153, 52729, 17576, 26), (39442, 55067, 15625, 25), (39471, 55096, 15625, 25), (39936, 53760, 13824, 24), (39937, 53761, 13824, 24)]

Another idea is to look at all those numbers whose Gray Codes are simply permutations of the number's original digits. It turns out that there are only 48 numbers with this property in the range up to 40000. I've added this sequence of numbers to my Bespoken for Sequences database as S086:


The list is as follows:

1, 54, 1126, 1488, 1489, 1636, 1637, 1746, 1812, 1813, 2351, 3272, 3273, 3492, 3624, 3625, 4356, 4659, 6544, 6545, 6902, 6985, 7051, 7248, 7249, 7520, 7550, 14184, 14185, 15041, 15101, 23500, 23501, 24219, 24907, 25173, 26519, 26635, 27402, 28213, 28292, 28293, 31428, 32157, 34305, 35258, 35380, 35411

Here are the numbers together with the permutated digits:

(1, 1), (54, 45), (1126, 1621), (1488, 1848), (1489, 1849), (1636, 1366), (1637, 1367), (1746, 1467), (1812, 1182), (1813, 1183), (2351, 3512), (3272, 2732), (3273, 2733), (3492, 2934), (3624, 2364), (3625, 2365), (4356, 6534), (4659, 6954), (6544, 5464), (6545, 5465), (6902, 6029), (6985, 5869), (7051, 5710), (7248, 4728), (7249, 4729), (7520, 5072), (7550, 5057), (14184, 11484), (14185, 11485), (15041, 10145), (15101, 10115), (23500, 30250), (23501, 30251), (24219, 29142), (24907, 20974), (25173, 21375), (26519, 21596), (26635, 23566), (27402, 24207), (28213, 22831), (28292, 22982), (28293, 22983), (31428, 18342), (32157, 17235), (34305, 50433), (35258, 52583), (35380, 53038), (35411, 53114)

Sunday, 6 August 2023

Hidden Beast Numbers

The number associated with my diurnal age today, 27153, gave me the idea for what I'm terming "hidden beast numbers". This number factorises to 3 x 3 x 7 x 431 and its sum of prime factors, with multiplicity, is 444. This prompted me to find all numbers whose sum of prime factors have identical digits. This sequence does not appear in the OEIS but I added it to my Bespoken for Sequences.

However, in this post I'm only interested in those numbers whose prime factors add to 666, the so-called "number of the beast". Obviously in numbers like 27666, the three sixes are scarcely hidden but in a number like: $$ 998515 = 5 \times 7 \times 47 \times 607$$the three sixes are not so obvious. It is only when we add the 5, 7, 47 and 607 together that find the 666.

The 248 numbers (excluding numbers whose sum is a single digit) with this property are as follows (permalink) up to one million:

3305, 3966, 4613, 6590, 7908, 8489, 12293, 14366, 14789, 21998, 29093, 29486, 32489, 35813, 36568, 40133, 41139, 43289, 46373, 48868, 48975, 51353, 52240, 55193, 57989, 57998, 58770, 60713, 62688, 67288, 70524, 75699, 78244, 79913, 81989, 83333, 84206, 87173, 87448, 92933, 97432, 98379, 98789, 99653, 100889, 105113, 106468, 106755, 106793, 107753, 108389, 109289, 109611, 110213, 110489, 110633, 113726, 113872, 119198, 128106, 146392, 146644, 158515, 163455, 164691, 169886, 174352, 175539, 183998, 190218, 196146, 200846, 203032, 208975, 210926, 212248, 215246, 219566, 219998, 226450, 228411, 230488, 232683, 238779, 247555, 250770, 257368, 259299, 267488, 271740, 283672, 289539, 289856, 290788, 291655, 292312, 297066, 300924, 317848, 319131, 323500, 325348, 326088, 328851, 342808, 345499, 349986, 353650, 357579, 366849, 368548, 379455, 383128, 385659, 388200, 391588, 396628, 404752, 405844, 406552, 414080, 416650, 424380, 429028, 431019, 436725, 436888, 436948, 438244, 441098, 452672, 455346, 457371, 458968, 465840, 467571, 480963, 491499, 493570, 494488, 496896, 499980, 507955, 509256, 516339, 524070, 530115, 533312, 553539, 556299, 559008, 565456, 572575, 572913, 573208, 579352, 592284, 599976, 609546, 614872, 625155, 628884, 630140, 631768, 636138, 644859, 651771, 658975, 659395, 666832, 674008, 674973, 687090, 691731, 693592, 697255, 705100, 710739, 721048, 725650, 729688, 732896, 733912, 748371, 750186, 756168, 757912, 758259, 759615, 780291, 786328, 789592, 790770, 791274, 799015, 804952, 807832, 810256, 811179, 820899, 821272, 824508, 825651, 825979, 835288, 836706, 843352, 843488, 843855, 846120, 848728, 850689, 851992, 852651, 860248, 866968, 868312, 868888, 870780, 879452, 879655, 884559, 884619, 888291, 900112, 900200, 902528, 905571, 908811, 911538, 912543, 923931, 928832, 939699, 948771, 948924, 951885, 954819, 957243, 958491, 958818, 967779, 975339, 976851, 977499, 979179, 992563, 998515

Looking through this list we see that there is only one number that contains, overtly, the sequence 666. The number is: $$ 666832 = 2 \times 2 \times 2 \times  2 \times 71 \times 587 $$So this number is rather special in that it contains both on overt and covert 666 sequence. Of course, if we consider only distinct prime factors, ignoring multiplicity, we get a different list with only 192 members and with some numbers in common between the two lists. Permalink.

3305, 3966, 4613, 6590, 7932, 8489, 11898, 12293, 13180, 14366, 14789, 15864, 16525, 21998, 23796, 26360, 28732, 29093, 29486, 31728, 32291, 32489, 32950, 35694, 35813, 40133, 43289, 43996, 46373, 47592, 51353, 52720, 55193, 57464, 57989, 57998, 58972, 60713, 63456, 65900, 71388, 79913, 81989, 82625, 83333, 84206, 87173, 87992, 92933, 95184, 98789, 99653, 100889, 105113, 105440, 106755, 106793, 107082, 107753, 108389, 109289, 110213, 110357, 110489, 110633, 113726, 114928, 115996, 117944, 119198, 126912, 131800, 142776, 158026, 163455, 164750, 168412, 169886, 175539, 175984, 183998, 190368, 200846, 210880, 210926, 214164, 215246, 219566, 219998, 226037, 227452, 229856, 231992, 233567, 235888, 238396, 247555, 250770, 253824, 263600, 285552, 291655, 297066, 316052, 320265, 321246, 329500, 336824, 339772, 340147, 349986, 351968, 367996, 373966, 379455, 380736, 401692, 413125, 421760, 421852, 428328, 430492, 439132, 439996, 454904, 459712, 463984, 467571, 471776, 476792, 480963, 490365, 493570, 501540, 507648, 507955, 526617, 527200, 530115, 533775, 553539, 571104, 594132, 609546, 625155, 632104, 642492, 659000, 659395, 673648, 678178, 679544, 687090, 697255, 699972, 703936, 735992, 747932, 748371, 752310, 759615, 761472, 790770, 791274, 799015, 803384, 817275, 823750, 825979, 836706, 843520, 843704, 843855, 856656, 860984, 878264, 879655, 879992, 884559, 891198, 909808, 912543, 919424, 927968, 943552, 953584, 957243, 958818, 960795, 963738, 987140, 998515

Looking through the list, the first new number to appear is 11898 with the property that: $$ 11898 = 2 \times 3 \times 3 \times 661$$In this number, we ignore the second 3 and thus the sum is 2 + 3 + 661 = 666.