Thursday 30 November 2023

Triple Strength Sphenic Numbers And More

Strong primes in cryptography are primes that are difficult to factor but in number theory a strong prime \(p_n\) has the property that:$$p_n>\frac{p_{n-1}+p_{n+1}}{2}$$If a sphenic number has three strong primes then it might be termed "triple strength" which is just a term that I came up with. These sorts of sphenic number constitute OEIS A363782:


 A363782

Products of three distinct strong primes.   

                          

There are only 44 such sphenic numbers in the range up to 40,000 and they are (permalink):

5423, 6919, 7667, 11033, 11803, 12529, 13079, 13277, 14773, 16687, 18139, 18241, 18821, 18887, 20009, 20213, 21373, 22649, 23749, 24013, 25201, 25619, 25789, 26609, 27269, 27863, 28897, 29087, 30217, 30481, 30943, 32021, 32153, 32219, 33031, 33473, 34133, 35003, 35629, 35717, 36839, 37111, 38947, 39479

Take 5423 = 11 x 17 x 29 as an example. 11 is closer to 13 than it is to 7, 17 is closer to 19 than it is to 13 and 29 is closer to 31 than it is to 23.

By contrast, sphenic numbers in which all three primes are weak are more numerous. A weak prime \(p_n\) has the property that:$$p_n<\frac{p_{n-1}+p_{n+1}}{2}$$These are not listed in the OEIS but there are 161 in the range up to 40,000 and they are (permalink):

1729, 2093, 2821, 3059, 3913, 4123, 4277, 4991, 5551, 5681, 5719, 6251, 6643, 6923, 7553, 7567, 7657, 8099, 8113, 9269, 9331, 9373, 9709, 9821, 9919, 10199, 10283, 10621, 11039, 11609, 11753, 11837, 11921, 12649, 12857, 13237, 13363, 13547, 13699, 13741, 14053, 14147, 14329, 14497, 15029, 15067, 15197, 15841, 16471, 16583, 17329, 17423, 17549, 17563, 18011, 18031, 18109, 18193, 18239, 18361, 18487, 18791, 18941, 19313, 20069, 20083, 20501, 20539, 20839, 21091, 21203, 21827, 21931, 21973, 21983, 22211, 22351, 22379, 23653, 24017, 24073, 24311, 24521, 24583, 24661, 24817, 24983, 25327, 25441, 25669, 25753, 26273, 26467, 26611, 26657, 26663, 26789, 26887, 26923, 27307, 27683, 27911, 28427, 28483, 28847, 29141, 29281, 29419, 30163, 30457, 30659, 30667, 30797, 30989, 31003, 31073, 31171, 31759, 31901, 32039, 32053, 32123, 32357, 32591, 32669, 32767, 32809, 33449, 33511, 33787, 33887, 34013, 34099, 34333, 34853, 35399, 35441, 35861, 35867, 35929, 36043, 36239, 36271, 36491, 36869, 37177, 37219, 37271, 37297, 37513, 37639, 38003, 38311, 38399, 38801, 38893, 38969, 39169, 39277, 39403, 39431

It should be noted that the famous taxi cab number, 1729, is the first member of this sequence and it factorises as follows:$$1729=7 \times 13 \times 19$$With 1729, we see that 7 is weak because it's closer to 5 than 11, 13 is weak because it's closer to 11 than 17 and 19 is weak because it's closer to 17 than it is to 23.

Primes that are the average of the previous prime and the next prime are called balanced primes. Sphenic numbers that are the product of three balanced primes are not numerous and there are none in the range up to 40,000. However, in the range up to one million, there are 82 of them. They are not listed in the OEIS and they are as follows (permalink):

41605, 45845, 55915, 68105, 69695, 98845, 135805, 149195, 157145, 160855, 165635, 173045, 182515, 194245, 201745, 206455, 222305, 227495, 250955, 258905, 271135, 277465, 292295, 292805, 297595, 314555, 322645, 324095, 337955, 362255, 393515, 400415, 441955, 462955, 464545, 465505, 476495, 479305, 486995, 490495, 505355, 512605, 512945, 525055, 564845, 575405, 593965, 606055, 625615, 634045, 640385, 640505, 688915, 709405, 723455, 740345, 743395, 762005, 766945, 769295, 773315, 779795, 779995, 785195, 798205, 819155, 839105, 845105, 858695, 865855, 876355, 877945, 881555, 931795, 941905, 954095, 960055, 963805, 963895, 971395, 989245, 999085

Take 41605 = 5 x 53 x 157 as an example. We have 5 as the average of 3 and 7, 53 as the average of 47 and 59 and 157 as the average of 151 and 163,

What about sphenic numbers that are the products of Sophie Germain primes? These turn out to be more numerous. There are 655 in the range up to 40000 out of a total of 7720. These numbers form OEIS A157346:


 A157346

Products of 3 distinct Sophie Germain primes.       
             


The initial members are (permalink):

30, 66, 110, 138, 165, 174, 230, 246, 290, 318, 345, 410, 435, 498, 506, 530, 534, 615, 638, 678, 759, 786, 795, 830, 890, 902, 957, 1038, 1074, 1130, 1146, 1166, 1245, 1265, 1310, 1334, 1335, 1353, 1398, 1434, 1506, 1595, 1686, 1695, 1730, 1749, 1758, 1790

Take 30 = 2 x 3 x 5 as an example. 2 x 2 + 1 = 5, 2 x 3 + 1 = 7 and 2 x 5 + 1 = 11.

What about sphenic numbers that are the product of primes that are the smaller of twin prime pairs? There are 277 such numbers in the range up to 40,000 and they are not listed in the OEIS. These numbers are as follows (permalink):

165, 255, 435, 561, 615, 885, 935, 957, 1065, 1353, 1479, 1515, 1595, 1605, 1947, 2055, 2091, 2235, 2255, 2343, 2465, 2685, 2865, 2955, 3009, 3245, 3333, 3405, 3485, 3531, 3567, 3585, 3621, 3905, 4035, 4215, 4521, 4665, 4917, 5015, 5133, 5151, 5205, 5423, 5457, 5555, 5885, 5907, 5945, 6035, 6177, 6285, 6303, 6465, 6501, 6915, 6987, 7257, 7491, 7535, 7599, 7667, 7815, 7887, 8195, 8535, 8555, 8585, 8733, 8787, 8877, 8985, 9095, 9129, 9255, 9273, 9309, 9615, 9741, 9845, 9885, 10047, 10263, 10295, 10505, 10835, 11033, 11451, 11577, 11645, 11919, 12095, 12135, 12189, 12315, 12405, 12423, 12485, 12567, 12665, 12855, 12963, 13079, 13145, 13161, 13215, 13277, 13719, 13827, 14223, 14331, 14555, 14645, 14795, 15213, 15215, 15285, 15455, 15465, 15515, 15573, 15735, 15861, 15915, 16235, 16365, 16617, 16745, 16851, 17105, 17139, 17193, 17265, 17697, 17877, 18327, 18435, 18777, 18821, 18887, 18939, 19085, 19155, 19295, 19335, 19515, 19749, 19767, 19785, 19865, 20009, 20213, 20315, 20361, 20705, 20793, 20945, 21153, 21369, 21405, 21513, 21605, 21747, 21765, 21935, 21981, 22017, 22215, 22305, 22649, 22791, 22865, 23045, 23403, 23493, 23511, 23705, 23885, 24105, 24231, 24249, 24285, 24447, 25005, 25355, 25455, 25619, 25815, 25955, 26373, 26435, 26571, 26609, 26697, 26805, 27057, 27093, 27291, 27695, 27863, 27921, 28065, 28085, 28155, 28281, 28565, 28655, 28965, 29019, 29073, 29087, 29181, 29235, 29397, 29495, 29795, 29955, 30189, 30405, 30545, 30549, 31215, 31295, 31305, 31467, 31565, 31665, 31683, 31737, 31935, 32021, 32115, 32219, 32421, 32691, 32915, 32945, 33087, 33473, 33555, 33609, 33627, 33807, 33935, 34005, 34023, 34133, 34563, 34617, 34635, 34655, 34869, 35003, 35013, 35085, 35255, 35615, 35715, 35717, 35855, 36003, 36245, 36453, 36635, 36695, 36839, 37497, 37983, 37985, 38127, 38235, 38253, 38865, 39005, 39155, 39185, 39855

Take 165 = 3 x 5 x 11 as an example. 3 is the smaller of the twin prime pair (3, 5), 5 is the smaller of the twin prime pair (5, 7) and 11 is the smaller of the twin prime pair (11, 13). At first sight, there appears to be too many numbers because the lesser prime of a twin prime pair is always a strong prime if the prime is greater than 5. This is because in a twin prime pair \( (p, p + 2)\) with \(p > 5\), \(p\) is always a strong prime, since \(3\) must divide \(p − 2\), which cannot be prime. 

Once we take out any sphenic numbers containing 3 or 5, we are left with only 21 sphenic numbers that contain primes that are both strong and the lesser of twin primes. These numbers are (permalink):

5423, 7667, 11033, 13079, 13277, 18821, 18887, 20009, 20213, 22649, 25619, 26609, 27863, 29087, 32021, 32219, 33473, 34133, 35003, 35717, 36839

Take 5423 = 11 x 17 x 29 as an example. This example was given earlier as the first member of OEIS  A363782 where we saw that 11 is closer to 13 than it is to 7, 17 is closer to 19 than it is to 13 and 29 is closer to 31 than it is to 23. Now, additionally, it can be seen that 11 is the lesser of (11, 13), 17 is the lesser of (17, 19) and 29 is the lesser of (29, 31).

What about sphenic numbers that are the product of primes that are the larger of twin prime pairs? There are 166 in the range up to 40,000 and they are (permalink):

455, 665, 1085, 1235, 1505, 1729, 2015, 2135, 2555, 2795, 2821, 2945, 3605, 3815, 3913, 3965, 4085, 4123, 4745, 4865, 5285, 5551, 5719, 5795, 6335, 6643, 6665, 6695, 6755, 6935, 6965, 7085, 7657, 8015, 8113, 8435, 9035, 9331, 9373, 9455, 9485, 9709, 9785, 9815, 9905, 9919, 10355, 10621, 10955, 11315, 11765, 12215, 12545, 12649, 12935, 13115, 13205, 13237, 13699, 13741, 14345, 14497, 14735, 14885, 15067, 15155, 15665, 15695, 15841, 15965, 16205, 16471, 16895, 17195, 17329, 17563, 17615, 18031, 18109, 18305, 18335, 18361, 18395, 18487, 18905, 19985, 20083, 20345, 20839, 21035, 21545, 21665, 21755, 21931, 21973, 22145, 22265, 22351, 22505, 22685, 22895, 23135, 23405, 23435, 23653, 24073, 24583, 24661, 25327, 25441, 25669, 25745, 25753, 26467, 26885, 26923, 27365, 28055, 28145, 28385, 28483, 28805, 29015, 29419, 29735, 29885, 29915, 30065, 30095, 30163, 30457, 30845, 30905, 31003, 31171, 31415, 31759, 32053, 32465, 32767, 32809, 33155, 33245, 33995, 34099, 34333, 35495, 35735, 35929, 36043, 36155, 36785, 37115, 37205, 37297, 37355, 37595, 37639, 38255, 38311, 38915, 39065, 39277, 39403, 39785, 39995

Take 455 = 5 x 7 x 13 as an example. 5 is the larger of the twin prime pair (3, 5), 7 is the larger of the twin prime pair (5, 7) and 13 is the larger of the twin prime pair (11, 13).

Clearly we could go on and on but that's probably enough for now. The same approach could be applied to composite numbers that are the product of two distinct prime, four distinct primes etc. For example, numbers that are the product of four distinct strong primes form OEIS A363167:


 A363167

Products of four distinct strong primes.                      



The 47 members up to one million are (permalink):

200651, 222343, 283679, 319957, 363341, 385033, 408221, 428417, 452353, 463573, 483923, 491249, 513689, 526031, 544357, 546601, 547723, 580261, 605693, 671143, 688721, 696377, 698819, 739211, 740333, 742951, 743699, 747881, 771661, 774367, 783343, 790801, 808027, 820369, 838013, 871607, 876293, 878713, 883949, 889559, 928609, 932437, 947903, 970717, 973709, 984533, 989791

Take 200651 = 11 x 17 x 29 x 37 as an example. 11 is closer to 13 than it is to 7, 17 is closer to 19 than it is to 13, 29 is closer to 31 than it is to 23 and 37 is closer to 41 than it is to 31. All the properties mentioned in this post are independent of the number base used.

Sunday 26 November 2023

Arithmetic Derivative Records

On June 19th 2019 I made a post titled Arithmetic Derivative and in this post I'll return to the topic. I was prompted to do so by one of the properties of the number associated with my diurnal age today. The number is 27265 and it has the property that its arithmetic derivative, 11448, has no digits in common with the number itself. I've listed these numbers in an entry in my Bespoken for Sequences.

I'm not going to pursue that topic in this post but I was reminded of arithmetic derivatives and got to thinking about records being set by the size of arithmetic derivatives as the natural numbers are traversed. It didn't take long to develop a SageMath algorithm to explore this topic (permalink). Detailed results are shown below in Table 1 with derivatives up 40000 in size, although the algorithm lists the records for numbers up to one million.


Table 1

The record setting sizes of the arithmetic derivatives form OEIS A131116 and the initial values are as follows:

4, 5, 12, 16, 32, 44, 80, 112, 192, 272, 448, 640, 1024, 1472, 2304, 2368, 3328, 3392, 5120, 5376, 7424, 7744, 11264, 12032, 16384, 16640, 17408, 24576, 26624, 35840, 36864, 38656, 53248, 58368, 77824, 80896, 84992, 114688, 126976, 167936, 176128, 185344, 245760, 274432, 360448, 380928, 401408, 524288, 528384, 589824, 593920, 770048, 774144, 819200, 864256, 1114112, 1130496, 1261568, 1277952, 1638400, 1658880, 1753088, 1851392, 2359296, 2408448, 2686976, 2736128, 3473408, 3538944, 3735552, 3948544, 4980736, 5111808, 5701632, 5832704, 7340032, 7520256, 7929856, 8388608

Table 2 shows a graph of these numbers:


Table 2

As can be seen from Table 1, all the numbers associated with these records contain all powers of 2 together with multiples of these powers. The initial numbers are:

4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 640, 768, 960, 1024, 1280, 1536, 1920, 2048, 2560, 3072, 3584, 3840, 4096, 5120, 6144, 7168, 7680, 8192, 10240, 12288, 14336, 15360, 16384, 20480, 24576, 28672, 30720, 32768, 40960, 49152, 57344, 61440, 65536, 73728, 81920, 90112, 98304, 110592, 114688, 122880, 131072, 147456, 163840, 180224, 196608, 221184, 229376, 245760, 262144, 294912, 327680, 360448, 393216, 442368, 458752, 491520, 524288, 589824, 655360, 720896, 786432, 884736, 917504, 983040

Saturday 25 November 2023

Four Fun Facts About Triangular Numbers

In my previous post (Happy Triangular Numbers) I made reference to a website Fascinating Triangular Numbers and this post I'd like to mention just four more of the "fun facts" mentioned there.

FUN FACT 1

The sum of two consecutive triangular numbers is a square number. This is easily proven as follow:$$ \begin{align} T_n+T_{n+1} &= \frac{n(n+1)}{2}+ \frac{(n+1)(n+2)}{2}\\ &= \frac{n+1}{2} \cdot (2n+2)\\ &= (n+1)^2 \end{align} $$FUN FACT 2:

The sum of the squares of two consecutive triangular numbers is also a triangular number. Again this is easily proven as follows:$$ \begin{align} \big (T_n \big )^2+ \big (T_{n+1} \big )^2&= \big (\frac{n(n+1)}{2} \big )^2+ \big ( \frac{(n+1)(n+2)}{2} \big )^2\\ &= \Big (\frac{n+1}{2} \Big )^2 \cdot \Big ( n^2+(n+2)^2 \Big )\\ &= \Big (\frac{n+1}{2} \Big )^2 \cdot \Big ( 2n^2+4n+4 \Big ) \\ &= \frac {(n^2 +2n+1) \cdot (n^2+2n+2)}{2} \\ &=T_{(n+1)^2} \end{align} $$FUN FACT 3:

There are infinitely many triangular numbers, which are also squares as given by the series 1, 36, 1225, 41616, 1413721, 48024900, 1631432881, 55420693056 etc. These can be termed as square triangular numbers. The \(n\)th Square Triangular number \(K_n\) can easily be obtained from the recursive formula: $$K_n = 34 \times K_{n-1} - K_{n-2} + 2$$So knowing the first two square triangular numbers i.e. \(K_1 = 1\) and \(K_2 = 36\) , all other successive Square Triangular numbers can be obtained. For example:$$ \begin{align} K_3 &= 34 \times K_2 - K_1 + 2 \\ &= 34 \times 36 -1 + 2 \\ &= 1225 \\ &= 35^2 \\ K_4 &= 34 \times K_3 - K_2 + 2 \\ &= 34 \times 1225 - 36 + 2 \\ &= 41616 \\ &=204^2 \end{align}$$FUN FACT 4:

There exist infinite triangular numbers that are simultaneously the sum, the difference and the product of two other triangular numbers. Here is a list of the initial such numbers:$$ \begin {align} 990 &= 1035 - 45 = 780 + 210 = 66 \times 15\\

1540 &= 1711 - 171 = 1485 + 55 = 55 \times 28\\

2850 &= 3003 - 153 = 2415 + 435 = 190 \times 15\\

4851 &= 5151 - 300 = 3081 + 1770 = 231 \times 21\\

8778 &= 10731 - 1953 = 7875 + 903 = 2926 \times 3\\

11781 &= 12246 - 465 = 11628 +153 = 561 \times 21\\

15400 &= 18721 - 3321 = 14365 + 1035 =1540 \times 10\\

26796 &= 27261 - 465 = 26565 + 231 = 406 \times 66\\

43956 &= 44551 - 595 = 41328 + 2628 = 666 \times 66 \end{align} $$Here are the initial triangular numbers along with their associated indices (permalink):

[(1, 1), (3, 2), (6, 3), (10, 4), (15, 5), (21, 6), (28, 7), (36, 8), (45, 9), (55, 10), (66, 11), (78, 12), (91, 13), (105, 14), (120, 15), (136, 16), (153, 17), (171, 18), (190, 19), (210, 20), (231, 21), (253, 22), (276, 23), (300, 24), (325, 25), (351, 26), (378, 27), (406, 28), (435, 29), (465, 30), (496, 31), (528, 32), (561, 33), (595, 34), (630, 35), (666, 36), (703, 37), (741, 38), (780, 39), (820, 40), (861, 41), (903, 42), (946, 43), (990, 44), (1035, 45), (1081, 46), (1128, 47), (1176, 48), (1225, 49), (1275, 50), (1326, 51), (1378, 52), (1431, 53), (1485, 54), (1540, 55), (1596, 56), (1653, 57), (1711, 58), (1770, 59), (1830, 60), (1891, 61), (1953, 62), (2016, 63), (2080, 64), (2145, 65), (2211, 66), (2278, 67), (2346, 68), (2415, 69), (2485, 70), (2556, 71), (2628, 72), (2701, 73), (2775, 74), (2850, 75), (2926, 76), (3003, 77), (3081, 78), (3160, 79), (3240, 80), (3321, 81), (3403, 82), (3486, 83), (3570, 84), (3655, 85), (3741, 86), (3828, 87), (3916, 88), (4005, 89), (4095, 90), (4186, 91), (4278, 92), (4371, 93), (4465, 94), (4560, 95), (4656, 96), (4753, 97), (4851, 98), (4950, 99), (5050, 100), (5151, 101), (5253, 102), (5356, 103), (5460, 104), (5565, 105), (5671, 106), (5778, 107), (5886, 108), (5995, 109), (6105, 110), (6216, 111), (6328, 112), (6441, 113), (6555, 114), (6670, 115), (6786, 116), (6903, 117), (7021, 118), (7140, 119), (7260, 120), (7381, 121), (7503, 122), (7626, 123), (7750, 124), (7875, 125), (8001, 126), (8128, 127), (8256, 128), (8385, 129), (8515, 130), (8646, 131), (8778, 132), (8911, 133), (9045, 134), (9180, 135), (9316, 136), (9453, 137), (9591, 138), (9730, 139), (9870, 140), (10011, 141), (10153, 142), (10296, 143), (10440, 144), (10585, 145), (10731, 146), (10878, 147), (11026, 148), (11175, 149), (11325, 150), (11476, 151), (11628, 152), (11781, 153), (11935, 154), (12090, 155), (12246, 156), (12403, 157), (12561, 158), (12720, 159), (12880, 160), (13041, 161), (13203, 162), (13366, 163), (13530, 164), (13695, 165), (13861, 166), (14028, 167), (14196, 168), (14365, 169), (14535, 170), (14706, 171), (14878, 172), (15051, 173), (15225, 174), (15400, 175), (15576, 176), (15753, 177), (15931, 178), (16110, 179), (16290, 180), (16471, 181), (16653, 182), (16836, 183), (17020, 184), (17205, 185), (17391, 186), (17578, 187), (17766, 188), (17955, 189), (18145, 190), (18336, 191), (18528, 192), (18721, 193), (18915, 194), (19110, 195), (19306, 196), (19503, 197), (19701, 198), (19900, 199), (20100, 200), (20301, 201), (20503, 202), (20706, 203), (20910, 204), (21115, 205), (21321, 206), (21528, 207), (21736, 208), (21945, 209), (22155, 210), (22366, 211), (22578, 212), (22791, 213), (23005, 214), (23220, 215), (23436, 216), (23653, 217), (23871, 218), (24090, 219), (24310, 220), (24531, 221), (24753, 222), (24976, 223), (25200, 224), (25425, 225), (25651, 226), (25878, 227), (26106, 228), (26335, 229), (26565, 230), (26796, 231), (27028, 232), (27261, 233), (27495, 234), (27730, 235), (27966, 236), (28203, 237), (28441, 238), (28680, 239), (28920, 240), (29161, 241), (29403, 242), (29646, 243), (29890, 244), (30135, 245), (30381, 246), (30628, 247), (30876, 248), (31125, 249), (31375, 250), (31626, 251), (31878, 252), (32131, 253), (32385, 254), (32640, 255), (32896, 256), (33153, 257), (33411, 258), (33670, 259), (33930, 260), (34191, 261), (34453, 262), (34716, 263), (34980, 264), (35245, 265), (35511, 266), (35778, 267), (36046, 268), (36315, 269), (36585, 270), (36856, 271), (37128, 272), (37401, 273), (37675, 274), (37950, 275), (38226, 276), (38503, 277), (38781, 278), (39060, 279), (39340, 280), (39621, 281), (39903, 282), (40186, 283), (40470, 284), (40755, 285), (41041, 286), (41328, 287), (41616, 288), (41905, 289), (42195, 290), (42486, 291), (42778, 292), (43071, 293), (43365, 294), (43660, 295), (43956, 296), (44253, 297), (44551, 298), (44850, 299), (45150, 300)]

The results for FUN FACT 4 could be written in terms of these indices. For example:$$ \begin {align} 990 &= 1035 - 45 = 780 + 210 = 66 \times 15\\ \text{T}_{44} &= \text{T}_{45} -\text{T}_{9} = \text{T}_{39} + \text{T}_{20} = \text{T}_{11} \times \text{T}_{5} \end{align}$$

Wednesday 22 November 2023

Happy Triangular Numbers

I have to confess to treating triangular numbers with some complacency over the years. Let's recall that triangular numbers are of the form:$$ \frac{n \, (n+1)}{2} \text{ with } n \geq 1$$The first triangular numbers are:

1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780, 820, 861, 903, 946, 990, 1035, 1081, 1128, 1176, 1225, 1275, 1326, 1378, 1431


Figure 1: Triangular numbers appear in Pascal's Triangle.
In fact 3rd diagonal of Pascal's Triangle, gives all triangular numbers as shown

Similarly I've grown rather complacent about happy numbers that have the property that repeated iterations of the sum of digits squared lead to 1. For example:$$ 27261 \rightarrow 94, 97, 130, 10, 1$$The reason that I chose 27261 is that it's the number associated with my diurnal age today.

It turns out however, that numbers that are both triangular and happy are rather rare. These types of numbers comprise OEIS A076712 and the initial members of the sequence are:

1, 10, 28, 91, 190, 496, 820, 946, 1128, 1275, 2080, 2211, 2485, 3321, 4278, 8128, 8256, 8778, 9591, 9730, 11476, 12090, 12880, 13203, 13366, 13530, 15753, 16471, 17205, 17578, 20910, 21115, 21321, 22791, 24753, 25651, 27261, 29890, 30135, 31626, 33670, 35245

As can be seen, it will be quite some time before I meet the next such number: 29890. The main reason for creating this post was to draw attention to an interesting website titled Fascinating Triangular Numbers run by Shyam Sunder Gupta. It was begun on October 26th 2002 but remains active. There is a plethora of information on this site about various properties of triangular numbers so it's a wonderful resource.

What follows are just two examples from the site:

Example 1: The only known example of a Pythagorean triangle (\(a, b, c\)) where \(a, b, c\) are triangular numbers is (8778, 10296, 13530): $$ \begin{align} 8778^2 + 10296^2 &= 13530^2 \\ (\text{T}_{132})^2 + (\text{T}_{143})^2 &= (\text{T}_{164})^2 \end{align} $$Example 2: The only known examples of a Pythagorean triangle such that both Perimeter as well as Area are triangular numbers are: $$(3312, 14091, 14475) \\ \text{with Perimeter} = 31878 = T_{252} \\ \text{and Area}= 23334696 = T_{6831}\\. \\ \text{and} \\ .\\(3405996, 8013265, 8707079) \\ \text{with Perimeter}= 20126340 = T_{6344} \\ \text{and Area}= 13646574268470 = T_{5224284} $$

Congruent Numbers

Over the years I've sometimes made note of when a number associated with my diurnal age is congruent. Often I've just ignored the fact. The definition of such number is:

A number is called congruent it is the area of a right triangle with rational sides.

The first congruent number is 5 because it is the area of a right triangle with sides of 20/3, 3/2, and 41/6. The next number, 6, is also congruent being the area of the famous 3, 4, 5 right triangle. See Figure 1.


Figure 1

7 is also a congruent number being the area of a right triangle with sides such that (see Figure 2):$$ \begin{align} \Big ( \frac{35}{12} \Big )^2+ \Big ( \frac{24}{5} \Big )^2 &= \Big ( \frac{337}{60} \Big )^2 \\ \frac{1}{2} \cdot \frac{35}{12} \cdot \frac{24}{5} &= 7 \end{align}$$


Figure 2

With 7, we begin to see the problem of determining whether a number is congruent or not. How do we find those fractions that confirm that 7 is congruent. It's not easy. To quote from Wikipedia:

The question of determining whether a given rational number is a congruent number is called the congruent number problem. This problem has not (as of 2019) been brought to a successful resolution. Tunnell's theorem provides an easily testable criterion for determining whether a number is congruent; but his result relies on the Birch and Swinnerton-Dyer conjecture, which is still unproven.
Without getting too deeply into this topic, it suffices to say that OEIS A006991 provides a list of so-called primitive congruent numbers up to 10,000.  These are congruent numbers that are square-free. If any of these numbers are multiplied by a positive square number, a new congruent number is created.

Let's take the number associated with my diurnal age yesterday as an example. 27260 factorises as follows:$$ \begin{align} 27260 &= 2^2 \times 5 \times 29 \times 47\\ &= 2^2 \times 6815 \end{align}$$Now 6815 is a member of OEIS A006991 and therefore 27260 is thus a congruent number because a primitive congruent number, 6815, has been multiplied by a positive square number (4).

It can be noted that 6814 is also a member of OEIS A006991 and thus 4 x 6814 = 27256 is also a congruent number. It's not uncommon for primitive congruent numbers to occur in pairs or even triples.  For example: (5, 6, 7), (13, 14, 15), (21, 22, 23), (29, 30, 31), 34 is a singleton, (37, 38, 39) etc.

Sunday 19 November 2023

Super-6 Numbers

The number associated with my diurnal age yesterday (27257) is a super-6 number. This means that \(6 \times 27257^6\) has a run of six consecutive digits of 6 within it, specifically:$$6 \times 27257^6=2460478505381\underline{666666}506497894$$This number is the first member of the sequence OEIS A032746. The initial members are:

27257, 272570, 302693, 323576, 364509, 502785, 513675, 537771, 676657, 678146, 731378, 831122, 836553, 913797, 920456, 921269, 1045361, 1144983, 1169054, 1283069, 1288697, 1292673, 1343642, 1346117, 1472078, 1523993, 1640026

27257 is the first super-6 number

The generalization of super-6 numbers is super-\(d\) numbers and I've written about these types of numbers in posts titled Super-d Numbers Revisited on March 25th 2023 and also Super-d Numbers on February 10th 2022. Permalink.

Wednesday 15 November 2023

27253: A Very Special Prime

In my recent post (October 24th 2023) titled Prime Digits, I mentioned primes whose digits are all prime. These primes constitute OEIS A019546 but 27253, while a member of this sequence, has an additional property that qualifies it for membership in OEIS A062088:


 A062088

Primes with every digit a prime and the sum of the digits a prime.


The initial members of this sequence are:

2, 3, 5, 7, 23, 223, 227, 337, 353, 373, 557, 577, 733, 757, 773, 2333, 2357, 2377, 2557, 2753, 2777, 3253, 3257, 3323, 3527, 3727, 5233, 5237, 5273, 5323, 5527, 7237, 7253, 7523, 7723, 7727, 22573, 23327, 25237, 25253, 25523, 27253, 27527, 32233, 32237, 32257

While this makes 27253 special enough, the number also has the property that the products of its digits plus 1 and the product of its digits minus 1 are also prime. This combination of properties (prime, all digits are prime, sum of digits is prime, product of digits -1 is prime and product of digits +1 is prime) is rare indeed and up to 100,000 only the following numbers qualify: 23, 223, 22573, 25237, 27253, 32233, 32257, 32323, 33223, 35227, 52237, 57223, 72253, 75223. They are not listed in the OEIS. Table 1 shows the details.


Table 1: permalink

It can be seen that the majority of these numbers are permutations of the digits of 27253 and thus have the same sum of digits and product of digits \( \pm \) 1. Unfortunately, I failed to notice 25237 when it occurred and it will be a long time in terms of my diurnal age before I encounter the next one (32233). So I felt I should make a note of 27253 in this post.

Thursday 2 November 2023

The Everyone Prime

The title of this post is a play on words and references a type of prime that has a home in OEIS A069246:


 A069246

Primes which yield a prime whenever a 1 is inserted anywhere in them (including at the beginning or end).



I came across such a prime as usual via the number associated with my diurnal age today: 27241. The insertion of a 1 in every possible position yields the numbers 127241, 217241, 271241, 272141 and 272411, all of which are prime. The initial members of the sequence are:

3, 7, 13, 31, 103, 109, 151, 181, 193, 367, 571, 601, 613, 811, 1117, 1831, 4519, 6871, 11119, 11317, 11467, 13171, 16141, 17167, 18211, 18457, 27241, 38917, 55381, 71317, 81199, 81931, 86743, 114031, 139861, 141667, 151687, 179203, 200191

The previous prime, 18457, marked my diurnal age long before I started tracking it and the next such prime, 38917, will occur long after I'm gone.

Insertions of the digits 3 and 7 are also possible and this yields two further OEIS sequences, namely OEIS A215419 and OEIS A215420 respectively.


 A215419

Primes that remain prime when a single digit 3 is inserted between any two consecutive digits or as the leading or trailing digit.



The initial members are:

7, 11, 17, 31, 37, 73, 271, 331, 359, 373, 673, 733, 1033, 2297, 3119, 3461, 3923, 5323, 5381, 5419, 6073, 6353, 9103, 9887, 18289, 23549, 25349, 31333, 32933, 33349, 35747, 37339, 37361, 37489, 47533, 84299, 92333, 93241, 95093, 98491, 133733, 136333, 139333, 232381, 233609


 A215420

Primes that remain prime when a single digit 7 is inserted between any two consecutive digits or as the leading or trailing digit.



The initial members are:

3, 19, 97, 433, 487, 541, 691, 757, 853, 1471, 2617, 2953, 4507, 6481, 7351, 7417, 8317, 13177, 31957, 42457, 46477, 47977, 50077, 59053, 71917, 73897, 74377, 77479, 77743, 77761, 79039, 99103, 175687, 220897

In creating the SageMath code to generate these sequences, I was initially perplexed as to how to proceed but a quick review of how to insert characters into an existing string soon clarified matters. The code is quite succinct and flexible thanks to the insert variable. An insert character of "1" is shown below but inserts of "3" and "7" yield the other two sequences (permalink).

L=[]
insert="1"
for p in prime_range(250000):
    number=str(p)
    OK=1
    for i in [0..len(number)]:
        if is_prime(int(number[:i]+insert+number[i:]))==0:
            OK=0
            break
    if OK==1:
        L.append(p)
print(L)

The code also makes it easy to investigate inserts of "11", "33, "77", "13", "17" and so on although the resulting sequences of numbers don't show up in the OEIS. The code can also be modified so that the insertions occur within the number itself and not before and after. In the case of "1" this yields OEIS A349636 (permalink):


 A349636

Primes that remain prime when a single "1" digit is inserted between any two adjacent digits.



The initial members of the sequence are:

13, 31, 37, 67, 79, 103, 109, 151, 163, 181, 193, 211, 241, 367, 457, 547, 571, 601, 613, 631, 709, 787, 811, 1117, 1213, 1831, 2017, 2683, 3019, 3319, 3391, 3511, 3517, 3607, 4519, 4999, 6007, 6121, 6151, 6379, 6673, 6871, 6991, 8293, 11119, 11317, 11467, 13171, 13933, 16141, 17167, 18211, 18457, 20101, 21187, 21319, 21817, 22453, 23599, 27241, 32413, 33613, 34543, 36919, 38629, 38917, 41113, 41947, 43759, 44101, 45013, 51109, 54361, 55381, 55813, 58237, 59863, 65731, 67777, 71317, 71713, 71983, 72169, 75193, 81199, 81931, 83221, 85159, 86239, 86743, 89017, 91129, 91303, 94117, 99817, 108907, 110917, 114031, 135019, 139861, 141667, 151687, 171517, 179203, 200191, 211507, 219031, 221941, 224011

As can be seen, these sorts of primes are more frequent compared to OEIS A069246. Of course 27241, my diurnal age today, is also a member of this sequence because  OEIS A069246 is a subsequence of OEIS A349636.

For a related and later post (April 6th 2024) that replicates a lot of the material in this post but does have some new material, go to the post titled "Primes and Nines".

Wednesday 1 November 2023

A Special Class of Interprime

Sometimes mathematical properties can be represented effectively by means of visual aids. This can mean graphs of course but not exclusively. Take for example, OEIS A103741:


 A103741

\(a(n)\) is a non-palindromic composite located between twin primes whose reverse, which is less than it, is also located between twin primes.


The number associated with my diurnal age today, 27240, is a member of this sequence because it is in between two adjacent primes, 27239 and 27241. When reversed to 4372, this reversal is also adjacent to two primes, namely 4371 and 4373. Visually this can be represented as shown in Figure 1 and it is quite effective. Notice how the reversal only works one way, from the larger number to the smaller and not vice versa, as shown by the directional arrows.


Figure 1

The initial members of this sequence are:

60, 240, 270, 600, 810, 822, 2130, 2340, 2802, 8010, 8220, 8430, 8838, 8862, 20550, 22740, 23202, 23370, 23910, 25410, 26880, 27240, 28410, 28572, 28662, 29022, 29760, 80472, 81702, 81930, 81972, 82140, 82530, 83220, 83340, 83640, 85620

What's interesting about this sequence is that there is a huge gap between 29760 and the next term 80472. This is more clearly seen in Figure 2 where the previous numbers have been plotted.


Figure 2

Figure 3 illustrates the number 80472 (not how the reversal here works both ways as shown by the directional arrows):


Figure 3

These types of interprimes thus fall into two categories: ones ending in 0 and ones ending in other digits. The former, like 27240, lead to interprimes that cannot then be reversed to return the original number. The latter, like 80472, lead to interprimes that can be reversed to return the original number.