Friday, 25 July 2025

27872: Another Palindromic Number

Every 100 days they come around and today marks another one as I turn 27872 days old. I've mentioned one of the properties of this number in my post titled Difference of Two Cubic Numbers. I noted that this palindrome is a difference of two cubes:27872=383303Another property of this palindrome is that it is the sum of two prime palindromes in two different ways:27872=11311+16561=12421+15451In the range up to 40000, there are only 25 palindromes with this property and these are the initial terms of OEIS A356854:

282, 484, 858, 888, 21912, 22722, 23832, 24642, 25752, 26662, 26762, 26862, 26962, 27672, 27772, 27872, 27972, 28482, 28782, 28882, 28982, 29692, 29792, 29892, 29992

27872 also has the property that it is the smallest palindrome with exactly seven prime factors, counted with multiplicity. This qualifies it for membership in OEIS A076886: smallest palindrome with exactly n prime factors (counted with multiplicity). See Figure 1 where the initial terms with their n values are listed.

Figure 1

In 100 days I'll be able to celebrate 27972 that's also a member of OEIS A356854.

Triangular Roots

While everyone has heard of a "square root", I for one had not heard of a "triangular root" defined for a number x as:x=1±1+8x2Suppose we want to find the triangular root of 6. This gives:6=1±1+8×62=1±1+482=1±492=1±72=3  or4The formula arises from the definition of a triangular number x and the solution of the resulting quadratic equation:n(n+1)2=xn2+n2x=0n=1±1+8x2This method is no different to what we do when finding the square root of a number where we have:n2=xn=±xBy way of comparison it can be noted that triangular roots are only real if x1/8 whereas square roots are only real if x0. I can thank Dr. Barker's YouTube video for prompting this post. 

Figure 1 shows the situation for 6=n(n+1)2 where n=4 or 3.


Figure 1:  -4 and 3 are the values of 6

Difference of Two Cubic Numbers

I'm surprised that I've not dealt with this topic before but as far as I can tell I haven't. The topic in question is numbers that are the difference of two cubes, or more specifically the difference of two positive cubes. My diurnal age today is 27872, a palindrome, with the property that:27872=383303It's easy enough to develop an algorithm to determine all such numbers in the range up to 40000 and the total is 825. However, if we consider only those numbers equal to or greater than 27872, then only 188 numbers qualify. They are (permalink):

27872, 27937, 28063, 28415, 28460, 28519, 28568, 28656, 28672, 28701, 28737, 28791, 28828, 28854, 29051, 29062, 29078, 29080, 29107, 29279, 29393, 29402, 29448, 29528, 29575, 29617, 29666, 29701, 29727, 29735, 29763, 29764, 29783, 29790, 30016, 30024, 30043, 30105, 30248, 30301, 30312, 30483, 30571, 30708, 30807, 30907, 30970, 31024, 31031, 31040, 31085, 31106, 31213, 31228, 31232, 31304, 31437, 31519, 31768, 31806, 31841, 31869, 31976, 32039, 32137, 32227, 32256, 32319, 32425, 32445, 32464, 32465, 32552, 32562, 32643, 32704, 32741, 32760, 32761, 32767, 32832, 32851, 32858, 32920, 32949, 32984, 33077, 33193, 33336, 33391, 33472, 33614, 33724, 33740, 33752, 33875, 34027, 34047, 34209, 34391, 34489, 34531, 34606, 34658, 34669, 34784, 34875, 34902, 34930, 34937, 35008, 35028, 35163, 35189, 35208, 35315, 35317, 35425, 35576, 35594, 35721, 35812, 35873, 35910, 35929, 35936, 35971, 36008, 36016, 36153, 36253, 36297, 36316, 36504, 36506, 36560, 36631, 36632, 36785, 36829, 37000, 37043, 37107, 37296, 37297, 37367, 37395, 37448, 37449, 37576, 37648, 37962, 37969, 37973, 38017, 38142, 38151, 38285, 38304, 38402, 38486, 38528, 38575, 38619, 38647, 38656, 38779, 38792, 38961, 39004, 39088, 39130, 39179, 39240, 39247, 39277, 39296, 39303, 39331, 39368, 39500, 39611, 39636, 39797, 39807, 39815, 39816, 39823 (see OEIS A181123)

Of these 188, there are five numbers that can be expressed as a difference of two cubes in more that one way. These are 27937, 28063, 34209, 35208 and 35929. The details are as follows:27937=333203=97396328063=313123=40333334209=333123=40331335208=33393=34316335929=33323=343153Notice that 27937 is a difference of successive cubes but, because it is not prime, it cannot be a Cuban prime. The only Cuban prime in the range is 33391where:33391=10631053I've dealt with this category of primes in my blog post titled Cuban Primes way back in July of 2016.

Wednesday, 23 July 2025

Shuffling Digits

Let's consider all those numbers in base 10 that retain their digits when changed into another number base. In other words, the digits of the number in base 10 are simply shuffled about. Let's start with base 9. In the range up to 40000 and ignoring single digit numbers, Table 1 shows the numbers with this property.



Table 1 showing
conversions to base 9

The base 10 numbers are 158, 227, 445, 1236, 1380, 2027, 2315, 2534, 5270, 5567, 5637, 5783, 10235, 10453, 11750, 13260, 13402, 13620, 21322, 21763, 21835, 23568, 26804, 32348, 34582, 35001, 35081, 35228, 37465 (permalink).

In base 11, the numbers and their conversions are shown in Table 2.


Table 2 showing
conversions to base 11

The numbers are 196, 283, 370, 1723, 4063, 7587, 8665, 15680, 16121, 18291, 19463, 19730, 23146, 26931, 32321, 35024, 38276 (permalink).

I won't show any further tables as they take up a fair amount of space but I'll list the results for other bases. Let's start with base 2 and work our way up (both only considering the range between 10 and 40000):
  • base 2: none
  • base 3: none
  • base 4: 13
  • base 5: none
  • base 6: 1045, 1135
  • base 7: 23, 46, 265, 316, 1030, 1234, 1366, 1431, 1454, 2060, 2116, 10144, 10342, 10542, 11425, 12415, 12450, 12564, 12651, 13045, 13245, 13534, 14610, 15226, 15643, 16255, 16546, 16633
  • base 8: 1273, 1653, 2154, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3226, 16273, 21753, 30576, 31457
  • base 9: 158, 227, 445, 1236, 1380, 2027, 2315, 2534, 5270, 5567, 5637, 5783, 10235, 10453, 11750, 13260, 13402, 13620, 21322, 21763, 21835, 23568, 26804, 32348, 34582, 35001, 35081, 35228, 37465
  • base 11:196, 283, 370, 1723, 4063, 7587, 8665, 15680, 16121, 18291, 19463, 19730, 23146, 26931, 32321, 35024, 38276
  • base 12: 2193, 6053, 7140, 7141, 7142, 7143, 7144, 7145, 7146, 7147, 7148, 7149, 7243, 7941, 9825, 24871, 25061, 25169, 34179
  • base 13: 43, 86, 191, 774, 958, 4621, 5272, 5812, 5920, 7364, 7834, 7873, 9304, 9343, 9413, 29103, 29610, 30189, 31112, 31481, 35731, 36417
  • base 14: 834, 6572, 9143, 9730, 9731, 9732, 9733, 9734, 9735, 9736, 9737, 9738, 9739]
  • base 15: 261, 5180
  • base 16: 53, 371, 913, 4100, 5141, 5412, 6182, 8200, 9241
We'll stop at base 16 but we could go on of course. Let's put all those numbers above into one ordered list:

13, 23, 43, 46, 53, 86, 158, 191, 196, 227, 261, 265, 283, 316, 370, 371, 445, 774, 834, 913, 958, 1030, 1045, 1135, 1234, 1236, 1273, 1366, 1380, 1431, 1454, 1653, 1723, 2027, 2060, 2116, 2154, 2193, 2315, 2534, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3226, 4063, 4100, 4621, 5141, 5180, 5270, 5272, 5412, 5567, 5637, 5783, 5812, 5920, 6053, 6182, 6572, 7140, 7141, 7142, 7143, 7144, 7145, 7146, 7147, 7148, 7149, 7243, 7364, 7587, 7834, 7873, 7941, 8200, 8665, 9143, 9241, 9304, 9343, 9413, 9730, 9731, 9732, 9733, 9734, 9735, 9736, 9737, 9738, 9739, 9825, 10144, 10235, 10342, 10453, 10542, 11425, 11750, 12415, 12450, 12564, 12651, 13045, 13245, 13260, 13402, 13534, 13620, 14610, 15226, 15643, 15680, 16121, 16255, 16273, 16546, 16633, 18291, 19463, 19730, 21322, 21753, 21763, 21835, 23146, 23568, 24871, 25061, 25169, 26804, 26931, 29103, 29610, 30189, 30576, 31112, 31457, 31481, 32321, 32348, 34179, 34582, 35001, 35024, 35081, 35228, 35731, 36417, 37465, 38276

There are no repeated numbers and there 158 numbers in total. Of these numbers, 31 are prime:

13, 23, 43, 53, 191, 227, 283, 1723, 2027, 3163, 3167, 4621, 5783, 6053, 7243, 7873, 9241, 9343, 9413, 9733, 9739, 10453, 15643, 16273, 16633, 19463, 25169, 31481, 32321, 35081, 35731

What stands out are the runs shown in blue above:
  • 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167 (base 8: permalink)
  • 7140, 7141, 7142, 7143, 7144, 7145, 7146, 7147, 7148, 7149 (base 12: permalink)
  • 9731, 9732, 9733, 9734, 9735, 9736, 9737, 9738, 9739 (base 14: permalink)

Sunday, 20 July 2025

Hexadecimal Words

Certain hexadecimal numbers contain only letters between A (10) and F (16) and so can form English words. The commonly accepted words are:

a, aba, abaca, abed, accede, acceded, ace, aced, ad, add, added, baa, baad, babe, bad, bade, baff, baffed, be, bead, beaded, bed, bedded, bee, beef, beefed, cab, cad, cade, cafe, cede, ceded, cee, dab, dabbed, dace, dad, daff, dead, deaf, decade, dee, deed, deeded, deface, defaced, ebb, ebbed, efface, effaced, fa, facade, face, faced, fad, fade, faded, fed, fee, feed

These hexadecimal "words" with their decimal equivalents are shown below (arranged alphabetically):

10 --> a
2746 --> aba
703178 --> abaca
44013 --> abed
11325150 --> accede
181202413 --> acceded
2766 --> ace
44269 --> aced
173 --> ad
2781 --> add
712173 --> added
2986 --> baa
47789 --> baad
47806 --> babe
2989 --> bad
47838 --> bade
47871 --> baff
12255213 --> baffed
190 --> be
48813 --> bead
12496365 --> beaded
3053 --> bed
12508653 --> bedded
3054 --> bee
48879 --> beef
12513261 --> beefed
3243 --> cab
3245 --> cad
51934 --> cade
51966 --> cafe
52958 --> cede
847341 --> ceded
3310 --> cee
3499 --> dab
14334957 --> dabbed
56014 --> dace
3501 --> dad
56063 --> daff
57005 --> dead
57007 --> deaf
14600926 --> decade
3566 --> dee
57069 --> deed
14609901 --> deeded
14613198 --> deface
233811181 --> defaced
3771 --> ebb
965613 --> ebbed
15727310 --> efface
251636973 --> effaced
250 --> fa
16435934 --> facade
64206 --> face
1027309 --> faced
4013 --> fad
64222 --> fade
1027565 --> faded
4077 --> fed
4078 --> fee
65261 --> feed

The decimal numbers in ascending order are:

10, 173, 190, 250, 2746, 2766, 2781, 2986, 2989, 3053, 3054, 3243, 3245, 3310, 3499, 3501, 3566, 3771, 4013, 4077, 4078, 44013, 44269, 47789, 47806, 47838, 47871, 48813, 48879, 51934, 51966, 52958, 56014, 56063, 57005, 57007, 57069, 64206, 64222, 65261, 703178, 712173, 847341, 965613, 1027309, 1027565, 11325150, 12255213, 12496365, 12508653, 12513261, 14334957, 14600926, 14609901, 14613198, 15727310, 16435934, 181202413, 233811181, 251636973

OEIS A132676 shows these same numbers. 

If we are only interested in decimal numbers whose hexadecimal equivalents contain only letters and no digits from 0 to 9 then these are listed in OEIS A228774. Up to 40000, there are 258 of them and they can be generated via this permalink.

10, 11, 12, 13, 14, 15, 170, 171, 172, 173, 174, 175, 186, 187, 188, 189, 190, 191, 202, 203, 204, 205, 206, 207, 218, 219, 220, 221, 222, 223, 234, 235, 236, 237, 238, 239, 250, 251, 252, 253, 254, 255, 2730, 2731, 2732, 2733, 2734, 2735, 2746, 2747, 2748, 2749, 2750, 2751, 2762, 2763, 2764, 2765, 2766, 2767, 2778, 2779, 2780, 2781, 2782, 2783, 2794, 2795, 2796, 2797, 2798, 2799, 2810, 2811, 2812, 2813, 2814, 2815, 2986, 2987, 2988, 2989, 2990, 2991, 3002, 3003, 3004, 3005, 3006, 3007, 3018, 3019, 3020, 3021, 3022, 3023, 3034, 3035, 3036, 3037, 3038, 3039, 3050, 3051, 3052, 3053, 3054, 3055, 3066, 3067, 3068, 3069, 3070, 3071, 3242, 3243, 3244, 3245, 3246, 3247, 3258, 3259, 3260, 3261, 3262, 3263, 3274, 3275, 3276, 3277, 3278, 3279, 3290, 3291, 3292, 3293, 3294, 3295, 3306, 3307, 3308, 3309, 3310, 3311, 3322, 3323, 3324, 3325, 3326, 3327, 3498, 3499, 3500, 3501, 3502, 3503, 3514, 3515, 3516, 3517, 3518, 3519, 3530, 3531, 3532, 3533, 3534, 3535, 3546, 3547, 3548, 3549, 3550, 3551, 3562, 3563, 3564, 3565, 3566, 3567, 3578, 3579, 3580, 3581, 3582, 3583, 3754, 3755, 3756, 3757, 3758, 3759, 3770, 3771, 3772, 3773, 3774, 3775, 3786, 3787, 3788, 3789, 3790, 3791, 3802, 3803, 3804, 3805, 3806, 3807, 3818, 3819, 3820, 3821, 3822, 3823, 3834, 3835, 3836, 3837, 3838, 3839, 4010, 4011, 4012, 4013, 4014, 4015, 4026, 4027, 4028, 4029, 4030, 4031, 4042, 4043, 4044, 4045, 4046, 4047, 4058, 4059, 4060, 4061, 4062, 4063, 4074, 4075, 4076, 4077, 4078, 4079, 4090, 4091, 4092, 4093, 4094, 4095

The final number (4095) in the list above is equivalent to "f f f" in hexadecimal. All the English words listed at the start of this post will be included in this list of course. Up to one million, there are 8034 such decimal numbers with letter-only hexadecimal equivalents and there are significant gaps between groups of numbers. See Figure 1.


Figure 1: permalink
On vertical scale 1.0 = One Million

Thursday, 17 July 2025

Beyond Emirp

An emirp is a prime that remains prime when its digits are reversed. Palindromic primes are excluded as the reversed number must be different from the original. For example, 13 and 17 are both emirps because 31 and 71 are prime. Another way to phrase this is say that: 

An emirp is a number with one prime factor (itself) such that its reverse (a different number) also only has one factor. 

This definition allows for a generalisation and a special class of numbers arises, namely:

Numbers with k prime factors, counting multiplicity, such that their reversals are different numbers and also contain k prime factors, counting multiplicity.

It's easy to set up an algorithm to determine all such numbers in a given range for various values of k. Let's consider the range up to 40000 and k=1. This will generate the emirps. There are 980 of them in the given range so I won't list them here. The sequence members can be found at A006567 or by following this permalink. The first few are 13, 17, 31, 37, 71, 73, 79 and 97.

For k=2, we get the semiprimes. There are an impressive 3450 in the range selected so again I won't show them here but the sequence members can be found at A097393 or by following this permalink. The first few are 15, 26, 39, 49, 51, 58, 62, 85, 93 and 94.

When k=3, we get 2750 numbers that satisfy starting with 117. Here is a permalink that will generate the numbers. Let's use 117 as an example.117=3×3×13711=3×3×79When k=4, we get 1302 numbers beginning with 126. Here is a permalink that will generate these numbers. Let's use 126 as an example.126=2×3×3×7621=3×3×3×23 For k=5, there are 429 numbers starting with 270. Here is a permalink that will generate the numbers. Let's look at 270.270=2×3×3×3×572=2×2×2×3×3For k=6, there are 103 numbers in the range and so I'll list them. Here is a permalink that will generate the numbers. The first such number is 2576:2576=24×7×236752=25×2112576, 2970, 4284, 4356, 4410, 4600, 4698, 4824, 5265, 5625, 6534, 6752, 6900, 8250, 8964, 10710, 10890, 13140, 13986, 16236, 16335, 17577, 18504, 19494, 20286, 20574, 21114, 21150, 21160, 21336, 21492, 21576, 21609, 21900, 21996, 22392, 22770, 22788, 22824, 22869, 23058, 23247, 23250, 23496, 23562, 23580, 23598, 24156, 24660, 24975, 25020, 25092, 25104, 25164, 25245, 25300, 25416, 25434, 25608, 25668, 26163, 26334, 26532, 27060, 27108, 27135, 27192, 27240, 27248, 27270, 27405, 27408, 27468, 27588, 27608, 27636, 27816, 28116, 28215, 28314, 28710, 28890, 29052, 29172, 29322, 29340, 29412, 29580, 29750, 29784, 29835, 29900, 29960, 29984, 32967, 34965, 35775, 35937, 36162, 36990, 37026, 38367, 38934

k=7 generates 25 and this is a small enough number such that we can factorise them all. Here is the permalink to generate numbers.

  number   factor                 reverse   factor

  8820     2^2 * 3^2 * 5 * 7^2    288       2^5 * 3^2
  21240    2^3 * 3^2 * 5 * 59     4212      2^2 * 3^4 * 13
  21708    2^2 * 3^4 * 67         80712     2^3 * 3^2 * 19 * 59
  21780    2^2 * 3^2 * 5 * 11^2   8712      2^3 * 3^2 * 11^2
  21920    2^5 * 5 * 137          2912      2^5 * 7 * 13
  23280    2^4 * 3 * 5 * 97       8232      2^3 * 3 * 7^3
  23472    2^4 * 3^2 * 163        27432     2^3 * 3^3 * 127
  23625    3^3 * 5^3 * 7          52632     2^3 * 3^2 * 17 * 43
  23800    2^3 * 5^2 * 7 * 17     832       2^6 * 13
  25560    2^3 * 3^2 * 5 * 71     6552      2^3 * 3^2 * 7 * 13
  25584    2^4 * 3 * 13 * 41      48552     2^3 * 3 * 7 * 17^2
  25758    2 * 3^5 * 53           85752     2^3 * 3^3 * 397
  26280    2^3 * 3^2 * 5 * 73     8262      2 * 3^5 * 17
  27432    2^3 * 3^3 * 127        23472     2^4 * 3^2 * 163
  27504    2^4 * 3^2 * 191        40572     2^2 * 3^2 * 7^2 * 23
  27888    2^4 * 3 * 7 * 83       88872     2^3 * 3 * 7 * 23^2
  27900    2^2 * 3^2 * 5^2 * 31   972       2^2 * 3^5
  28836    2^2 * 3^4 * 89         63882     2 * 3^3 * 7 * 13^2
  29250    2 * 3^2 * 5^3 * 13     5292      2^2 * 3^3 * 7^2
  29403    3^5 * 11^2             30492     2^2 * 3^2 * 7 * 11^2
  29736    2^3 * 3^2 * 7 * 59     63792     2^4 * 3^2 * 443
  29970    2 * 3^4 * 5 * 37       7992      2^3 * 3^3 * 37
  30492    2^2 * 3^2 * 7 * 11^2   29403     3^5 * 11^2
  34884    2^2 * 3^3 * 17 * 19    48843     3^6 * 67
  36828    2^2 * 3^3 * 11 * 31    82863     3^5 * 11 * 31

For k=8 there are only three such numbers (permalink):

  number   factor               reverse   factor

  16560    2^4 * 3^2 * 5 * 23   6561      3^8
  25515    3^6 * 5 * 7          51552     2^5 * 3^2 * 179
  27864    2^3 * 3^4 * 43       46872     2^3 * 3^3 * 7 * 31

For k=9 there are four suitable numbers in the given range but for k>9 there are no suitable numbers in the range.

  number   factor              reverse   factor

  21168    2^4 * 3^3 * 7^2     86112     2^5 * 3^2 * 13 * 23
  23424    2^7 * 3 * 61        42432     2^6 * 3 * 13 * 17
  23616    2^6 * 3^2 * 41      61632     2^6 * 3^2 * 107
  27456    2^6 * 3 * 11 * 13   65472     2^6 * 3 * 11 * 31

Tuesday, 15 July 2025

Palindromes Within Palindromes

I'm surprised that I've not covered this sequence before but checking through my previous posts it certainly seems as if I haven't. Here is the sequence in question:


A046351
  Palindromic composite numbers with only palindromic prime factors.

The initial members of this sequence, up to 40000, are (permalink):

4, 6, 8, 9, 22, 33, 44, 55, 66, 77, 88, 99, 121, 202, 242, 252, 262, 303, 343, 363, 393, 404, 484, 505, 525, 606, 616, 626, 686, 707, 808, 909, 939, 1111, 1331, 1441, 1661, 1991, 2112, 2222, 2662, 2772, 2882, 3333, 3443, 3773, 3883, 3993, 4224, 4444, 5445, 5555, 5775, 6336, 6666, 6776, 6886, 7777, 7997, 8448, 8888, 9999, 10201, 12221, 13231, 14641, 15251, 15851, 18281, 19291, 20402, 20602, 22622, 22822, 23232, 24442, 24842, 25152, 25452, 26462, 26662, 28682, 30603, 30903, 31613, 33933, 34643, 35653, 36663, 37673, 37873, 38683, 39693, 39993

There are 94 terms in all. Let's just look at the numbers with two distinct prime factors but each of which is two digits or longer. It can be noted that these numbers have either 11 or 101 as factors.

  number   factors

  1111     11 * 101
  1441     11 * 131
  1661     11 * 151
  1991     11 * 181
  3443     11 * 313
  3883     11 * 353
  7997     11 * 727
  13231    101 * 131
  15251    101 * 151
  18281    101 * 181
  19291    101 * 191
  31613    101 * 313
  35653    101 * 353
  37673    101 * 373
  38683    101 * 383

From the above it can be noted that multiplying a palindrome by 11 or 101 seems to produce another palindrome. By extension, multiplying a palindrome by 1001, 10001, 100001 etc. will often produce another palindrome. For example:10001×1340431=13405650431Even a series of alternating 1's and 0's may also produce palindromes. For example:10101×1340431=13539693531However, such products of palindromes are NOT always palindromic. For example:11×1949999491=21449994401101×1949999491=1969499485911001×1940491=194243149110101×1940491=19600899591If all the digits of the second palindrome are less than 5 then the multiplication will always produce palindromes.

Saturday, 12 July 2025

13x+1 Record Breaker

Trajectory length record breakers for the 3x + 1, 5x + 1, 7x + 1, 11x + 1, 13x + 1 and 17x + 1 Collatz mappings are a fairly exclusive set of numbers and its members from 27859 to 40000 are 27859, 28927, 30301, 30771, 32326, 32581, 34239, 35556, 35655, 35803, 37647, 38030, 39053, 39254 and 39281. Why start at 27859? Well this is the number associated with my diurnal age and the next celebration of such an event is about three years away when I reach 28927 days old. 27859 is associated with the 13x + 1 mapping where the numbers that mark the record breaking trajectory lengths are shown in Figure 1.


Figure 1: see blog post

Figure 2 shows the trajectory for 27859 using a logarithmic scale for the vertical axis.


Figure 2: permalink

The trajectory is as follows ending in a 7, 1, 14, 7 loop. The maximum value reached is an impressive 1,004,280,846,804. That's just over a trillion. That's why a logarithmic scale was needed for the vertical axis!

27859, 362168, 181084, 90542, 45271, 588524, 294262, 147131, 1912704, 956352, 478176, 239088, 119544, 59772, 29886, 14943, 4981, 64754, 32377, 420902, 210451, 2735864, 1367932, 683966, 341983, 4445780, 2222890, 1111445, 222289, 2889758, 1444879, 18783428, 9391714, 4695857, 61046142, 30523071, 10174357, 132266642, 66133321, 859733174, 429866587, 5588265632, 2794132816, 1397066408, 698533204, 349266602, 174633301, 2270232914, 1135116457, 14756513942, 7378256971, 95917340624, 47958670312, 23979335156, 11989667578, 5994833789, 856404827, 11133262752, 5566631376, 2783315688, 1391657844, 695828922, 347914461, 115971487, 1507629332, 753814666, 376907333, 34264303, 445435940, 222717970, 111358985, 22271797, 289533362, 144766681, 1881966854, 940983427, 12232784552, 6116392276, 3058196138, 1529098069, 19878274898, 9939137449, 129208786838, 64604393419, 839857114448, 419928557224, 209964278612, 104982139306, 52491069653, 4771915423, 433810493, 5639536410, 2819768205, 939922735, 187984547, 2443799112, 1221899556, 610949778, 305474889, 101824963, 1323724520, 661862260, 330931130, 165465565, 33093113, 430210470, 215105235, 71701745, 14340349, 186424538, 93212269, 1211759498, 605879749, 7876436738, 3938218369, 51196838798, 25598419399, 3656917057, 47539921742, 23769960871, 309009491324, 154504745662, 77252372831, 1004280846804, 502140423402, 251070211701, 83690070567, 27896690189, 362656972458, 181328486229, 60442828743, 20147609581, 1831600871, 23810811324, 11905405662, 5952702831, 1984234277, 25795045602, 12897522801, 4299174267, 1433058089, 18629755158, 9314877579, 3104959193, 443565599, 5766352788, 2883176394, 1441588197, 480529399, 68647057, 892411742, 446205871, 5800676324, 2900338162, 1450169081, 18852198054, 9426099027, 3142033009, 40846429118, 20423214559, 1856655869, 24136526298, 12068263149, 4022754383, 52295806980, 26147903490, 13073951745, 4357983915, 1452661305, 484220435, 96844087, 1258973132, 629486566, 314743283, 4091662680, 2045831340, 1022915670, 511457835, 170485945, 34097189, 4871027, 695861, 9046194, 4523097, 1507699, 19600088, 9800044, 4900022, 2450011, 31850144, 15925072, 7962536, 3981268, 1990634, 995317, 12939122, 6469561, 924223, 12014900, 6007450, 3003725, 600745, 120149, 1561938, 780969, 260323, 37189, 483458, 241729, 3142478, 1571239, 20426108, 10213054, 5106527, 66384852, 33192426, 16596213, 5532071, 71916924, 35958462, 17979231, 5993077, 77910002, 38955001, 506415014, 253207507, 36172501, 470242514, 235121257, 33588751, 4798393, 62379110, 31189555, 6237911, 81092844, 40546422, 20273211, 6757737, 2252579, 321797, 45971, 597624, 298812, 149406, 74703, 24901, 323714, 161857, 2104142, 1052071, 13676924, 6838462, 3419231, 44450004, 22225002, 11112501, 3704167, 48154172, 24077086, 12038543, 1094413, 14227370, 7113685, 1422737, 18495582, 9247791, 3082597, 440371, 5724824, 2862412, 1431206, 715603, 102229, 1328978, 664489, 94927, 13561, 176294, 88147, 1145912, 572956, 286478, 143239, 1862108, 931054, 465527, 6051852, 3025926, 1512963, 504321, 168107, 2185392, 1092696, 546348, 273174, 136587, 45529, 4139, 53808, 26904, 13452, 6726, 3363, 1121, 14574, 7287, 2429, 347, 4512, 2256, 1128, 564, 282, 141, 47, 612, 306, 153, 51, 17, 222, 111, 37, 482, 241, 3134, 1567, 20372, 10186, 5093, 463, 6020, 3010, 1505, 301, 43, 560, 280, 140, 70, 35, 7, 1, 14, 7

Friday, 11 July 2025

A Special Number: 3367

 Figure 1 shows an interesting result via Cliff Pickover.


To see why 3367 can be written as the various fractions shown, one approach is to consider a number of the form 0a0a0a where 1a99. Let's manipulate this number in the following way:0a0a0aa+a+a=a×0101013a=0101013=3367Thus when a=11 we have:0a0a0aa+a+a=11111111+11+11If a>99, then the pattern breaks down.

Thursday, 10 July 2025

A Peculiarity

Sometimes, when looking for properties of the number associated with my diurnal age, I struggle to find a property that interests me. Today was one such occasion and the number was 27857. However, I did notice a "peculiarity" as I call it and it involved both the sum of the number's digits cubed and the number's proper divisors. Firstly, the digits cubed:2785723+73+83+53+73=1331Next, let's consider the number's proper divisors:278571,89,313 as proper divisorssum of proper divisors =403=13×311331 when concatenated

This peculiarity is quite rare and in fact up to one hundred million, there is only one other number with this same property and that is 150809. The details are:15080913+53+03+83+03+93=13671508091,239,631 as proper divisorssum of proper divisors =871=13×671367 when concatenatedSo 27857 has a very interesting property after all, even if it is rather obscure. I still find it rather amazing that I was able to check up to one hundred million using SageMath on my M1 Macbook Air.

Wednesday, 9 July 2025

Partitions and Generating Functions

I asked Gemini to explain the statement:

“It’s long been known that you can associate
a polynomial equation to any partition.”

Here's what it came up with.

The statement refers to the relationship between an integer partition and a generating function, which is a way of encoding an infinite sequence of numbers as the coefficients of a formal power series. In this context, the "polynomial equation" is more accurately a generating function, which can be represented as a polynomial-like expression.


A partition of a positive integer n is a way of writing n as a sum of positive integers. The order of the addends (the parts of the partition) does not matter. For example, the partitions of the number 4 are:

  • 4

  • 3 + 1

  • 2 + 2

  • 2 + 1 + 1

  • 1 + 1 + 1 + 1

The statement means that for any given integer, we can construct a polynomial-like expression (a generating function) that "encodes" all of its possible partitions.

How the Association Works

The connection is established through the concept of generating functions. The generating function for the number of partitions of an integer n, denoted as p(n), can be expressed as an infinite product:P(x)=n=0p(n)xn=k=111xkLet's break down this formula:

  • p(n) This represents the number of partitions for an integer n

  • n=0p(n)xn This is the power series where the coefficient of xn is the number of partitions of n.

  • k=111xk This is the infinite product that generates these coefficients.


Each term in the product 11xk can be expanded as a geometric series:

  • 11x=1+x+x2+x3+ This represents using the number 1 as a part in the partition

  • 11x2=1+x2+x4+x6+ This represents using the number 2 as a part

  • 11x3=1+x3+x6+x9+ This represents using the number 3 as a part

  • And so on for all integers k.

When you multiply these series together, the coefficient of xn in the resulting series will be the total number of ways to form n by adding these parts.

Examples

Let's find the partitions for the number 3. The partitions are:

  • 3

  • 2 + 1

  • 1 + 1 + 1

There are 3 partitions of 3.


Now, let's see how the generating function gives us this result. We look at the expansion of the product:(1+x+x2+x3+)(1+x2+x4+)(1+x3+x6+)To get the term x3, we can combine terms from these expansions in the following ways:

  • From the first factor, take x3. This corresponds to the partition 1 + 1 + 1.

  • From the first factor, take x1, and from the second factor, take x2. This corresponds to the partition 1 + 2.

  • From the third factor, take x3. This corresponds to the partition 3.


The coefficient of x3 is therefore 3, which matches the number of partitions.


Here is another example for the partitions of 4, which we know is 5.


To find the coefficient of x4, we would consider combinations like:

  • x4 from the first factor: 1 + 1 + 1 + 1

  • x2 from the first factor and x2 from the second: 1 + 1 + 2

  • x1 from the first factor and x3 from the third: 1 + 3

  • x4 from the second factor: 2 + 2

  • x4 from the fourth factor: 4


The total number of ways to get x4 is 5, so the coefficient is 5.


In essence, the "polynomial" or generating function provides a systematic way to count the number of partitions for any integer by looking at the coefficients of the series expansion.

Wednesday, 2 July 2025

Prime Factor Sequences

I'm surprised I've not come across this type of sequence before. It has two variants and they are generated iteratively as follows:

  • number --> sum of prime factors without multiplicity
    For example, 24 with factors of 2 and 3 gives 5 and terminates after just one step

  • number --> sum of prime factors with multiplicity
    For example, 24 with factors of 2, 2, 2 and 3 gives 11 and terminates after just one step
Larger numbers of course take more than one step to terminate and it's of interest to consider those numbers that set records in term of trajectory lengths. In this context, let's consider OEIS A047830.


A047830  least number which becomes prime after exactly n iterations of f(x) = sum of prime factors of x.


The members of this sequence are 4, 14, 26, 62, 134, 393, 1774, 13682, 41037 up to 100,000. The trajectories are shown in Figure 1 with length indicating the number of steps or iterations:


Figure 1: permalink

If the sum of prime factors with multiplicity is considered then we get OEIS A121360 with sequence members 1, 8, 14, 26, 62, 134, 393, 1257, 4659, 9314, 27933 up to 100,000. The trajectories are shown in Figure 2 with length indicating the number of steps or iterations:



Figure 2: permalink

The algorithms used to find the trajectories of record lengths can be easily modified to find numbers with trajectories of a specified length (number of steps or iterations). For example, how many numbers in the range up to 40000 require eight steps to reach a prime under the sum of prime factors without multiplicity algorithm. Here are the numbers (with 13682 being the first as we know already from Figure 1):

13682, 18002, 19137, 22934, 24014, 24787, 27364, 27849, 30062, 30993, 32577, 33477, 35410, 35798, 36004, 36398, 36706, 39206

These numbers are the initial members of OEIS A047827. Figure 3 shows the details of their trajectories:


Figure 3: permalink

Building Sequences from a Seed Pair

 FIRST EXAMPLE

The numbers 1 and 4 have the interesting properties that:

  • their sum is prime: 1 + 4 = 5
  • their difference is prime: 4 - 1 = 3
  • their product (4) is the average of a pair of twin primes (3 and 5)
Let's make this the starting point of a sequence and let the third member of the sequence be x. This gives us: 1,4,x. We want 4 and x to share the properties that 1 and 4 enjoyed. Namely:
  • 4 + x is prime
  • x - 4 is prime
  • 4 ×x is the average of a pair of twin primes
A little trial and error shows that the smallest value of x we are looking for is 15 because:
  • 4 + 15 = 19 is prime
  • 15 - 4 = 11 is prime
  • 4 × 15 = 60 is average of a pair of twin pairs (59 and 61)
By using not trial and error but a simple algorithm we can find further terms. The result is OEIS A154493 and the initial terms are:

1, 4, 15, 28, 39, 50, 81, 350, 459, 512, 675, 944, 987, 1040, 1917, 1936, 2325, 2378, 2421, 2588, 2745, 2812, 3459, 3488, 3495, 3506, 5667, 5804, 6027, 6074, 24765, 24832, 25479, 25552, 27621, 27848, 27951, 27980, 34101, 34720, 34773, 35344

SECOND EXAMPLE

Let's take another seed pair with the simple property that the two numbers must add to a cubic number. We'll use 1 and 7 as our seed pair because: 1+7=8=23. Here we see that the next number must be 20 because 7+20=27=33. Using an algorithm, the sequence generated begins thus (permalink):

1, 7, 20, 44, 81, 135, 208, 304, 425, 575, 756, 972, 1225, 1519, 1856, 2240, 2673, 3159, 3700, 4300, 4961, 5687, 6480, 7344, 8281, 9295, 10388, 11564, 12825, 14175, 15616, 17152, 18785, 20519, 22356, 24300, 26353, 28519, 30800, 33200, 35721, 38367

THIRD EXAMPLE

Let's start with seed numbers 1 and 2 this time with the property that:
  • the sum of the two numbers has a digit sum that is prime
  • the product of the two numbers plus 1 has a digit product that is prime
The seed pair 1 and 2 satisfy since:
  • the sum of 1 and 2 is 3 and 3 is prime
  • the product of 1 and 2 plus 1 is 3 and 3 is prime
This leads to the following sequence: 1, 2, 9, 12, 13, 16, 18, 23, 24, 25, 27, 29, 32, 33, 34, 40, 45, 47, 51, 60, 62, 66, 100, ... (permalink). There are 2211 terms in the range up to 40000.