Monday, 21 August 2023

Circulant Matrix to the Rescue

I was stuck for several days on a number associated with my diurnal age: 27164. I couldn't anything of interest about this number, or at least nothing that interested me. In the end, I remembered the circulant matrix that is associated with each number. For the case of 27164 this matrix is shown below. $$ \begin{pmatrix}2&7&1&6&4\\4&2&7&1&6\\6&4&2&7&1\\1&6&4&2&7\\7&1&6&4&2 \end{pmatrix}$$The determinant of this matrix is 100 and there are only 89 numbers in the range up to one million that have 100 as their determinant. These numbers are:

799, 979, 997, 12674, 14762, 16427, 17246, 21476, 23564, 24617, 24653, 25436, 26345, 26741, 27164, 32465, 33455, 33554, 34445, 34454, 34526, 34535, 34544, 34553, 35345, 35354, 35435, 35444, 35543, 35642, 36254, 41267, 42356, 42716, 43355, 43445, 43454, 43535, 43544, 43625, 44345, 44354, 44435, 44453, 44534, 44543, 45263, 45344, 45353, 45434, 45443, 45533, 46172, 46532, 47621, 52634, 53246, 53345, 53444, 53453, 53534, 53543, 54335, 54344, 54353, 54362, 54434, 54443, 55334, 55433, 56423, 61724, 62147, 62543, 63452, 64235, 64271, 65324, 67412, 71642, 72461, 74126, 76214, 303040, 304030, 403030, 889898, 988898, 989888

Of these, many are permutations of the digits of 27164. These permutations are shown below in bold with 27164 itself marked in red.

12467, 12476, 12647, 12674, 12746, 12764, 14267, 14276, 14627, 14672, 14726, 14762, 16247, 16274, 16427, 16472, 16724, 16742, 17246, 17264, 17426, 17462, 17624, 17642, 21467, 21476, 21647, 21674, 21746, 21764, 24167, 24176, 24617, 24671, 24716, 24761, 26147, 26174, 26417, 26471, 26714, 26741, 27146, 27164, 27416, 27461, 27614, 27641, 41267, 41276, 41627, 41672, 41726, 41762, 42167, 42176, 42617, 42671, 42716, 42761, 46127, 46172, 46217, 46271, 46712, 46721, 47126, 47162, 47216, 47261, 47612, 47621, 61247, 61274, 61427, 61472, 61724, 61742, 62147, 62174, 62417, 62471, 62714, 62741, 64127, 64172, 64217, 64271, 64712, 64721, 67124, 67142, 67214, 67241, 67412, 67421, 71246, 71264, 71426, 71462, 71624, 71642, 72146, 72164, 72416, 72461, 72614, 72641, 74126, 74162, 74216, 74261, 74612, 74621, 76124, 76142, 76214, 76241, 76412, 76421

Admittedly, focusing on a determinant of 100 is rather arbitrary, but it is a nice round number and it certainly came to my aid in finding an interesting property of 27164. This prompted me to investigate the range of values for the determinants in the natural numbers up to 40,000. It turns out the minimum value of -19683 occurs with 9909 and the maximum value of 205821 occurs with 30990 and 39009. Figure 1 shows a plot of the values of the determinants.


Figure 1: permalink

As can be seen it is four digit numbers from 1000 up to 9999 that fluctuate between positive and negative. The three digit numbers and the five digit numbers up to 40000 are all positive. The positive/negative fluctuations recur once the six digit numbers are reached. This is to be expected of course given the way the determinant is calculated. Figure 2 a close up of the range from 10 to 10000.


Figure 2: permalink

Monday, 14 August 2023

Biprimes and Permutations

I got to thinking today about biprimes, or semiprimes as they are also called, and how many have factors that are reversals of each other. Well, it doesn't take long to work that out using this code. Figure 1 shows the results up to one million (there are 18 numbers):


Figure 1

These numbers form part of OEIS A083815:


 A083815

Semiprimes whose prime factors are distinct and the reversal of one factor is equal to the other.


An extension of this idea to consider factors in which the digits of both factors are the same but permutations of each other. This would include all the numbers in OEIS A083815. Figure 2 shows the 79 numbers up to one million together with their factorisations (permalink):


Figure 2

Here are the numbers listed without the factorisation:

403, 1207, 2701, 7663, 14803, 23701, 26827, 34417, 35143, 35263, 40741, 43429, 54841, 62431, 70027, 73159, 75007, 89647, 99919, 101461, 102853, 103039, 103603, 117907, 125701, 127087, 128701, 130771, 140209, 141643, 146791, 150463, 153211, 173809, 174001, 182881, 191287, 197209, 201379, 205729, 212887, 230701, 232909, 246991, 247021, 249979, 257821, 273409, 280081, 293383, 295501, 297709, 302149, 326371, 342127, 355123, 367639, 371989, 374971, 382387, 386803, 394279, 427729, 428821, 436789, 453613, 462031, 469537, 503059, 565129, 589429, 643063, 690199, 692443, 698149, 743623, 778669, 824737, 910729

This sequence is not in the OEIS.

Sunday, 13 August 2023

Per Nørgård's Infinity Sequence

The number associated with my diurnal yesterday (27159) has a property that qualifies it for inclusion in OEIS A083866:


 A083866

Positions of zeros in Per Nørgård's infinity sequence (A004718).                 



This naturally led me find out what the Per Nørgård's infinity sequence was all about. So let's look at OEIS A004718.


A004718

The Danish composer Per Nørgård's "infinity sequence", invented in an attempt to unify in a perfect way repetition and variation: a(2\(n\)) = -a(\(n\)), a(2\(n\)+1) = a(\(n\)) + 1, a(0) = 0.



The first one hundred terms are:

0, 1, -1, 2, 1, 0, -2, 3, -1, 2, 0, 1, 2, -1, -3, 4, 1, 0, -2, 3, 0, 1, -1, 2, -2, 3, 1, 0, 3, -2, -4, 5, -1, 2, 0, 1, 2, -1, -3, 4, 0, 1, -1, 2, 1, 0, -2, 3, 2, -1, -3, 4, -1, 2, 0, 1, -3, 4, 2, -1, 4, -3, -5, 6, 1, 0, -2, 3, 0, 1, -1, 2, -2, 3, 1, 0, 3, -2, -4, 5, 0, 1, -1, 2, 1, 0, -2, 3, -1, 2, 0, 1, 2, -1, -3, 4, -2, 3, 1, 0

The maximum is 6 and the minimum is -5. If we extend the number of terms to 10,000, the maximum is 13 and the minimum is -12. Extending to one million returns a maximum of 19 and a minimum of -18. Figure 1 shows a graph of the first one hundred terms.


Figure 1: permalink

There's an extensive literature out there regarding this sequence and the music associated with it but I won't go into that here. This is post is just to reference the sequence and explain how the terms are generated.

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. 

Friday, 4 August 2023

Biprime Prime Time

For some reason, it only just occurred to me that I can search this blog for the occurrence of particular numbers. Usually I search the OEIS first and if nothing of interest comes up, I search my Bespoken for Sequences database. If there's nothing there, I'll search the airtable.com database and if nothing turns up, I'll search for the number in the OEIS b-files. However, searching this blog should probably be my second priority if nothing comes up in the OEIS. After all I have hundreds of posts and thousands of numbers.


The theme of this post concerns biprimes or semiprimes where there is a connection between one prime and the other. The idea derived from the number associated with my diurnal age today: 27149. This number is a member of OEIS A045925:


 A045925

a(\(n\)) = \(n\) * Fibonacci(\(n\)).                                                            



When \(n=17\), we have Fibonacci(17) = 1597 which is prime and 27149 = 17 x 1597. Very few of the members of this sequence are biprimes because \(n\) can be composite and\or Fibonacci(\(n\)) can be composite. The biprimes are listed below (in bold):

3 --> 6 = 2 * 3
5 --> 25 = 5^2
7 --> 91 = 7 * 13
11 --> 979 = 11 * 89
13 --> 3029 = 13 * 233
17 --> 27149 = 17 * 1597
23 --> 659111 = 23 * 28657
29 --> 14912641 = 29 * 514229
43 --> 18640260791 = 43 * 433494437
47 --> 139647108431 = 47 * 2971215073


We are looking for biprimes of the form prime multiplied by some function of that prime where the function generates a new prime. An easy source of such numbers arises from OEIS A073065

 
 A073065



a(\(n\)) = prime(\(n\)) * prime(prime(\(n\))).



The sequence begins: 6, 15, 55, 119, 341, 533, 1003, 1273, 1909, 3161, 3937, 5809, 7339, 8213, 9917, 12773, 16343, 17263, 22177, 25063, 26791, 31679, 35773, 41029

The breakdown is as follows:

1 --> 2 x 3 = 6
2 --> 3 x 5 = 15
3 --> 5 x 11 = 55
4 --> 7 x 17 = 119
5 --> 11 x 31 = 341
6 --> 13 x 41 = 533
7 --> 17 x 59 = 1003
8 --> 19 x 67 = 1273
9 --> 23 x 83 = 1909
10 --> 29 x 109 = 3161
11 --> 31 x 127 = 3937
12 --> 37 x 157 = 5809
13 --> 41 x 179 = 7339
14 --> 43 x 191 = 8213
15 --> 47 x 211 = 9917
16 --> 53 x 241 = 12773
17 --> 59 x 277 = 16343
18 --> 61 x 283 = 17263
19 --> 67 x 331 = 22177
20--> 71 x 353 = 25063
21 --> 73 x 367 = 26791
22 --> 79 x 401 = 31679
23 --> 83 x 431 = 35773
24 --> 89 x 461 = 41029
25 --> 97 x 509 = 49373


Another way to find "special" biprimes is to determine which of them concatenate to form new primes, either by smaller with larger or larger with smaller. Such biprimes form OEIS A330441:


 A330441

Semiprimes \(p \times q\) such that the concatenations of \(p\) and \(q\) in both orders are prime.                     



Here is a list of the initial members (508) of this sequence up to 40000:

21, 33, 51, 93, 111, 133, 177, 201, 219, 247, 253, 327, 411, 427, 573, 589, 679, 687, 763, 793, 813, 889, 993, 1077, 1081, 1119, 1243, 1339, 1347, 1401, 1411, 1497, 1501, 1603, 1623, 1651, 1671, 1821, 1839, 1843, 1851, 1981, 2019, 2047, 2059, 2103, 2157, 2199, 2217, 2469, 2479, 2629, 2761, 2787, 2841, 2923, 3031, 3039, 3057, 3097, 3099, 3133, 3153, 3409, 3439, 3543, 3579, 3661, 3711, 3787, 3829, 3883, 3973, 4063, 4171, 4303, 4309, 4369, 4381, 4429, 4443, 4593, 4681, 4711, 4771, 4821, 4837, 4843, 4881, 4971, 4989, 5001, 5097, 5191, 5299, 5533, 5611, 5721, 5761, 5803, 5971, 5989, 6181, 6207, 6429, 6457, 6511, 6559, 6613, 6639, 6799, 6891, 7003, 7131, 7143, 7153, 7233, 7323, 7327, 7363, 7501, 7509, 7633, 7711, 7737, 8121, 8173, 8197, 8227, 8347, 8367, 8529, 8659, 8743, 8751, 8871, 9147, 9211, 9217, 9229, 9307, 9313, 9357, 9493, 9523, 9589, 9793, 9853, 9903, 10063, 10171, 10249, 10297, 10351, 10383, 10407, 10441, 10483, 10519, 10537, 10777, 10807, 10843, 10849, 10911, 10963, 11107, 11307, 11539, 11581, 11623, 11629, 11653, 11707, 11733, 11769, 11793, 11797, 11851, 12001, 12057, 12133, 12187, 12193, 12477, 12643, 12759, 12961, 13027, 13117, 13153, 13387, 13471, 13749, 13771, 13813, 13951, 13993, 14187, 14257, 14623, 14677, 14757, 14803, 14977, 15049, 15127, 15151, 15153, 15177, 15229, 15247, 15297, 15513, 15571, 15697, 15769, 15843, 15883, 15969, 16003, 16009, 16143, 16257, 16347, 16357, 16387, 16501, 16507, 16521, 16543, 16563, 16593, 16719, 16837, 17089, 17131, 17173, 17269, 17371, 17403, 17503, 17517, 17521, 17607, 17769, 17779, 17803, 17833, 17953, 18111, 18219, 18247, 18319, 18673, 18697, 18709, 18789, 18829, 18831, 18841, 18871, 18943, 18949, 19021, 19033, 19039, 19059, 19353, 19357, 19407, 19587, 19627, 19689, 19693, 19713, 19741, 19797, 19807, 19897, 19911, 19939, 19959, 20059, 20191, 20221, 20317, 20379, 20581, 20613, 20671, 20697, 20701, 20841, 21117, 21133, 21151, 21171, 21253, 21439, 21457, 21477, 21691, 21703, 21759, 22069, 22107, 22207, 22267, 22459, 22507, 22759, 22773, 22947, 23073, 23317, 23377, 23503, 23527, 23713, 23731, 23889, 24031, 24193, 24313, 24343, 24487, 24607, 24613, 24643, 24657, 24711, 24721, 24949, 25081, 25131, 25267, 25291, 25293, 25507, 25549, 25651, 25729, 25777, 25813, 25887, 25963, 26007, 26077, 26089, 26097, 26139, 26167, 26241, 26329, 26349, 26359, 26401, 26629, 26761, 26989, 27049, 27309, 27469, 27471, 27493, 27543, 27619, 27723, 27781, 28117, 28129, 28189, 28383, 28417, 28563, 28831, 28869, 28993, 29113, 29227, 29239, 29407, 29479, 29533, 29571, 29647, 29661, 29703, 29707, 29713, 29731, 30273, 30333, 30499, 30507, 30511, 30607, 30669, 30721, 30729, 30799, 30979, 30999, 31071, 31087, 31273, 31279, 31363, 31377, 31453, 31459, 31483, 31549, 31621, 31701, 31711, 31881, 31969, 32167, 32197, 32281, 32313, 32667, 32743, 32961, 33043, 33081, 33103, 33519, 33531, 33591, 33913, 34063, 34117, 34179, 34321, 34339, 34341, 34417, 34459, 34609, 34653, 34789, 34813, 34933, 34957, 35173, 35299, 35359, 35383, 35463, 35481, 35601, 35691, 35743, 35779, 35943, 35953, 36019, 36181, 36213, 36259, 36303, 36367, 36601, 36609, 36649, 36667, 36759, 36763, 36769, 36807, 36961, 37029, 37063, 37099, 37239, 37267, 37351, 37353, 37399, 37621, 37803, 38059, 38109, 38131, 38137, 38347, 38359, 38389, 38523, 38623, 38647, 38683, 38697, 38929, 38937, 39007, 39049, 39427, 39487, 39553, 39613, 39649, 39823, 39931, 39967

 For example, 27309= 3 * 9103 and the concatenations 39103 and 91033 are both prime.

Monday, 31 July 2023

Iban Numbers

I was struggling to find something of significance (in my mind) about the number associated with my diurnal age today which is 27147. However, after much fruitless investigation and experimentation, I noticed something at the very bottom of the Numbers Aplenty entry for the number. It read as follows:

The spelling of 27147 in words is "twenty-seven thousand, one hundred forty-seven", and thus it is an iban number.

Hmmm. What on Earth is an iban number I thought. Well a definition was only a hyperlink away:

A number is called iban if its name (in English) does not contain the letter "i". Assuming that the name of every power of 10 greater than \(10^5\)  ends in "-illion" (like million, billion, trillion, etc.), then the iban numbers are finite. Counting 0 (zero) there are 30276 of them, the largest being 777777. Iban numbers belong to the same family as aban numbers, eban numbers, oban numbers, and uban numbers. 

These numbers constitute OEIS A089589:


 A089589

Iban numbers (the letter i is banned from the English name of the number).


The initial members are:

0, 1, 2, 3, 4, 7, 10, 11, 12, 14, 17, 20, 21, 22, 23, 24, 27, 40, 41, 42, 43, 44, 47, 70, 71, 72, 73, 74, 77, 100, 101, 102, 103, 104, 107, 110, 111, 112, 114, 117, 120, 121, 122, 123, 124, 127, 140, 141, 142, 143, 144, 147, 170, 171, 172, 173, 174, 177, 200, 201

The OEIS comments include the following Python code:
from itertools import islice
from num2words import num2words
def agen(): yield from (k for k in range(10**6) if "i" not in num2words(k))
print(list(islice(agen(), 60)))

This doesn't work so I asked Google's Bard to fix the problem and it said to add the line "import num2words". This gives the following code: 

import num2words
from itertools import islice
from num2words import num2words
def agen(): yield from (k for k in range(10**6) if "i" not in num2words(k))
print(list(islice(agen(), 60)))

This code actually works using SageMath on my laptop and generates the entire 30276 numbers by replacing the 60. However, it still won't run on SageMathCell or online Python compiler like Programitz.

The num2words works as shown in Figure 1:


Figure 1

 There are many iban numbers in the range between 27000 and 28000. Here they are:

27000, 27001, 27002, 27003, 27004, 27007, 27010, 27011, 27012, 27014, 27017, 27020, 27021, 27022, 27023, 27024, 27027, 27040, 27041, 27042, 27043, 27044, 27047, 27070, 27071, 27072, 27073, 27074, 27077, 27100, 27101, 27102, 27103, 27104, 27107, 27110, 27111, 27112, 27114, 27117, 27120, 27121, 27122, 27123, 27124, 27127, 27140, 27141, 27142, 27143, 27144, 27147, 27170, 27171, 27172, 27173, 27174, 27177, 27200, 27201, 27202, 27203, 27204, 27207, 27210, 27211, 27212, 27214, 27217, 27220, 27221, 27222, 27223, 27224, 27227, 27240, 27241, 27242, 27243, 27244, 27247, 27270, 27271, 27272, 27273, 27274, 27277, 27300, 27301, 27302, 27303, 27304, 27307, 27310, 27311, 27312, 27314, 27317, 27320, 27321, 27322, 27323, 27324, 27327, 27340, 27341, 27342, 27343, 27344, 27347, 27370, 27371, 27372, 27373, 27374, 27377, 27400, 27401, 27402, 27403, 27404, 27407, 27410, 27411, 27412, 27414, 27417, 27420, 27421, 27422, 27423, 27424, 27427, 27440, 27441, 27442, 27443, 27444, 27447, 27470, 27471, 27472, 27473, 27474, 27477, 27700, 27701, 27702, 27703, 27704, 27707, 27710, 27711, 27712, 27714, 27717, 27720, 27721, 27722, 27723, 27724, 27727, 27740, 27741, 27742, 27743, 27744, 27747, 27770, 27771, 27772, 27773, 27774, 27777

Prior to 27000, the last iban number is 24777 and after 27777, the next is 40000.  Figure 2 shows a plot of the iban numbers.


Figure 2

While we're at it, we may as well look at similar types of numbers. Let's start with aban numbers. Numbers Aplenty defines these as follows:
A number is called aban if its name (in English) does not contain the letter "a". The word "and" is not counted and in general I do not use it when I spell out numbers. Among the words used to construct numbers names, only the word "thousand" contains an "a" so the aban numbers are the numbers from 1 to 999, from 1000000 to 1000999, from 2000000 to 2000999, and so on. The sum of the reciprocals of aban numbers does not converge and grows slowlytowards infinity.

Figure 3 shows a graph of the initial aban numbers up to 1000 which are:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 200, 300, 400, 500, 600, 700, 800, 900


Figure 2

Next we'll consider eban numbers defined as follows by Numbers Aplenty:
A number is called eban if its name (in English) does not contain the letter "e".
It is easy to see that the eban numbers are all even and their last two digits must be one of 02, 04, 06, 30, 32, 34, 36, 40, 42, 44, 46, 50, 52, 54, 56, 60, 62, 64, or 66.

Here are the initial members and Figure 3 shows a plot of these numbers:

2, 4, 6, 30, 32, 34, 36, 40, 42, 44, 46, 50, 52, 54, 56, 60, 62, 64, 66, 2000, 2002, 2004, 2006, 2030, 2032, 2034, 2036, 2040, 2042, 2044, 2046, 2050, 2052, 2054, 2056, 2060, 2062, 2064, 2066, 4000, 4002, 4004, 4006, 4030, 4032, 4034, 4036, 4040, 4042, 4044, 4046, 4050, 4052, 4054, 4056, 4060, 4062, 4064, 4066, 6000, 6002, 6004, 6006, 6030, 6032, 6034, 6036, 6040, 6042, 6044, 6046, 6050, 6052, 6054, 6056, 6060, 6062, 6064, 6066, 30000, 30002, 30004, 30006, 30030, 30032, 30034, 30036, 30040, 30042, 30044, 30046, 30050, 30052, 30054, 30056, 30060, 30062, 30064, 30066, 32000, 32002, 32004, 32006, 32030, 32032, 32034, 32036, 32040, 32042, 32044, 32046, 32050, 32052, 32054, 32056, 32060, 32062, 32064, 32066, 34000, 34002, 34004, 34006, 34030, 34032, 34034, 34036, 34040, 34042, 34044, 34046, 34050, 34052, 34054, 34056, 34060, 34062, 34064, 34066, 36000, 36002, 36004, 36006, 36030, 36032, 36034, 36036, 36040, 36042, 36044, 36046, 36050, 36052, 36054, 36056, 36060, 36062, 36064, 36066, 40000, 40002, 40004, 40006, 40030, 40032, 40034, 40036, 40040, 40042, 40044, 40046, 40050, 40052, 40054, 40056, 40060, 40062, 40064, 40066, 42000, 42002, 42004, 42006, 42030, 42032, 42034, 42036, 42040, 42042, 42044, 42046, 42050, 42052, 42054, 42056, 42060, 42062, 42064, 42066, 44000, 44002, 44004, 44006, 44030, 44032, 44034, 44036, 44040, 44042, 44044, 44046, 44050, 44052, 44054, 44056, 44060, 44062, 44064, 44066, 46000, 46002, 46004, 46006, 46030, 46032, 46034, 46036, 46040, 46042, 46044, 46046, 46050, 46052, 46054, 46056, 46060, 46062, 46064, 46066, 50000, 50002, 50004, 50006, 50030, 50032, 50034, 50036, 50040, 50042, 50044, 50046, 50050, 50052, 50054, 50056, 50060, 50062, 50064, 50066, 52000, 52002, 52004, 52006, 52030, 52032, 52034, 52036, 52040, 52042, 52044, 52046, 52050, 52052, 52054, 52056, 52060, 52062, 52064, 52066, 54000, 54002, 54004, 54006, 54030, 54032, 54034, 54036, 54040, 54042, 54044, 54046, 54050, 54052, 54054, 54056, 54060, 54062, 54064, 54066, 56000, 56002, 56004, 56006, 56030, 56032, 56034, 56036, 56040, 56042, 56044, 56046, 56050, 56052, 56054, 56056, 56060, 56062, 56064, 56066, 60000, 60002, 60004, 60006, 60030, 60032, 60034, 60036, 60040, 60042, 60044, 60046, 60050, 60052, 60054, 60056, 60060, 60062, 60064, 60066, 62000, 62002, 62004, 62006, 62030, 62032, 62034, 62036, 62040, 62042, 62044, 62046, 62050, 62052, 62054, 62056, 62060, 62062, 62064, 62066, 64000, 64002, 64004, 64006, 64030, 64032, 64034, 64036, 64040, 64042, 64044, 64046, 64050, 64052, 64054, 64056, 64060, 64062, 64064, 64066, 66000, 66002, 66004, 66006, 66030, 66032, 66034, 66036, 66040, 66042, 66044, 66046, 66050, 66052, 66054, 66056, 66060, 66062, 66064, 66066


Figure 3

This leads on to the oban numbers defined as follows by Numbers Aplenty:
A number is called oban if its name (in English) does not contain the letter "o".
Assuming that the name of every power of 10 greater than  $10^5$  ends in "-illion" (like million, billion, trillion, etc.), then the oban numbers are finite. There are 454 of them, the largest begin 999.

The numbers are as follows with Figure 4 providing a graph of these numbers. 

3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 23, 25, 26, 27, 28, 29, 30, 33, 35, 36, 37, 38, 39, 50, 53, 55, 56, 57, 58, 59, 60, 63, 65, 66, 67, 68, 69, 70, 73, 75, 76, 77, 78, 79, 80, 83, 85, 86, 87, 88, 89, 90, 93, 95, 96, 97, 98, 99, 300, 303, 305, 306, 307, 308, 309, 310, 311, 312, 313, 315, 316, 317, 318, 319, 320, 323, 325, 326, 327, 328, 329, 330, 333, 335, 336, 337, 338, 339, 350, 353, 355, 356, 357, 358, 359, 360, 363, 365, 366, 367, 368, 369, 370, 373, 375, 376, 377, 378, 379, 380, 383, 385, 386, 387, 388, 389, 390, 393, 395, 396, 397, 398, 399, 500, 503, 505, 506, 507, 508, 509, 510, 511, 512, 513, 515, 516, 517, 518, 519, 520, 523, 525, 526, 527, 528, 529, 530, 533, 535, 536, 537, 538, 539, 550, 553, 555, 556, 557, 558, 559, 560, 563, 565, 566, 567, 568, 569, 570, 573, 575, 576, 577, 578, 579, 580, 583, 585, 586, 587, 588, 589, 590, 593, 595, 596, 597, 598, 599, 600, 603, 605, 606, 607, 608, 609, 610, 611, 612, 613, 615, 616, 617, 618, 619, 620, 623, 625, 626, 627, 628, 629, 630, 633, 635, 636, 637, 638, 639, 650, 653, 655, 656, 657, 658, 659, 660, 663, 665, 666, 667, 668, 669, 670, 673, 675, 676, 677, 678, 679, 680, 683, 685, 686, 687, 688, 689, 690, 693, 695, 696, 697, 698, 699, 700, 703, 705, 706, 707, 708, 709, 710, 711, 712, 713, 715, 716, 717, 718, 719, 720, 723, 725, 726, 727, 728, 729, 730, 733, 735, 736, 737, 738, 739, 750, 753, 755, 756, 757, 758, 759, 760, 763, 765, 766, 767, 768, 769, 770, 773, 775, 776, 777, 778, 779, 780, 783, 785, 786, 787, 788, 789, 790, 793, 795, 796, 797, 798, 799, 800, 803, 805, 806, 807, 808, 809, 810, 811, 812, 813, 815, 816, 817, 818, 819, 820, 823, 825, 826, 827, 828, 829, 830, 833, 835, 836, 837, 838, 839, 850, 853, 855, 856, 857, 858, 859, 860, 863, 865, 866, 867, 868, 869, 870, 873, 875, 876, 877, 878, 879, 880, 883, 885, 886, 887, 888, 889, 890, 893, 895, 896, 897, 898, 899, 900, 903, 905, 906, 907, 908, 909, 910, 911, 912, 913, 915, 916, 917, 918, 919, 920, 923, 925, 926, 927, 928, 929, 930, 933, 935, 936, 937, 938, 939, 950, 953, 955, 956, 957, 958, 959, 960, 963, 965, 966, 967, 968, 969, 970, 973, 975, 976, 977, 978, 979, 980, 983, 985, 986, 987, 988, 989, 990, 993, 995, 996, 997, 998, 999


Figure 4

Last come uban numbers defined by Numbers Aplenty as follows:
A number is called uban if its name (in English) does not contain the letter "u".
In particular, it cannot contain the terms "four", "hundred", and "thousand", So the uban number following 99 is 1000000. Despite being quite sparse, the sum of the reciprocals of uban numbers slowly diverges.

Here is a list of the initial uban numbers:

0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 93, 95, 96, 97, 98, 99

Of course, you could choose the absence of certain consonants as well if you wanted to and the so-called tban numbers are in fact listed as OEIS A008523. The initial members of the sequence are:

0, 1, 4, 5, 6, 7, 9, 11, 100, 101, 104, 105, 106, 107, 109, 111, 400, 401, 404, 405, 406, 407, 409, 411, 500, 501, 504, 505, 506, 507, 509, 511, 600, 601, 604, 605, 606, 607, 609, 611, 700, 701, 704, 705, 706, 707, 709, 711, 900, 901, 904, 905, 906, 907, 909, 911, 1000000, 1000001, 1000004, 1000005 

That's probably enough as these types of numbers have no real mathematical significance but it was interesting to come across the idea of them and is relevant to my previous post on Numbers and Letters from July 21st 2023.