Friday, 1 August 2025

Numbers Reversed

What numbers in the range up to 40000 are palindromes formed by the multiplication of a number and its reversal? 

Let's require that the numbers being multiplied are not themselves palindromes because palindromic numbers when multiplied together always form palindromes. We find that only four numbers satisfy: 252, 20502, 23632, 26962 (see permalink). The details are shown in the table below: 


The next number is 2005002 formed by the multiplication of 1002 and 2001. All the numbers being multiplied only consist of the digits 0, 1 and 2 as far as I can tell. For example, 40220902204 is a product of 200102 and 201002. There are no other starting numbers larger than 200102 in the range up to one million because of this restriction. Above one million, the first suitable number is 1000002 which multiplied by its reversal 2000001 produces the palindrome 2000005000002. In fact, any number formed from the digits 0, 1 and 2 (that does not end in 0) will produce a palindrome when multiplied by its reversal.

We can break away from this 0, 1, 2 restriction if we ask:
What numbers in the range up to 40000 are palindromes formed by the multiplication of a number and its reversal plus 1? 
Well, once again, in the range up to 40000, there aren't many. In fact there are only 404, 575 and 737 (see permalink) with details shown in the table below.


The next number after 23 is 318317 which, when multiplied by 713813, gives 227218812722.

Wednesday, 30 July 2025

A Well-Known Legendre Prime-Producing Polynomial

 Here is what Gemini had to say about the prime-producing polynomial 2k2+29:

The polynomial 2k2+29 is a well-known example of a prime-producing polynomial, often associated with the French mathematician Adrien-Marie Legendre. Here's a breakdown of its discovery, usage, and prime-producing potential:

Discovery:

  • Adrien-Marie Legendre (1752-1833) is credited with the discovery of the polynomial 2k2+29. He published this result in his work "Essai sur la théorie des nombres" in 1798.

  • This came in the wake of significant work on prime-generating polynomials, notably Euler's polynomial k2+k+41, which generates primes for 40 consecutive integer values. Legendre's work further explored this fascinating property in different polynomial forms.

Usage and Significance:

  • Illustrates Prime-Generating Properties: While no non-constant polynomial with integer coefficients can generate only prime numbers for all integer values (this has been proven), polynomials like 2k2+29 are significant because they produce a surprisingly long sequence of prime numbers for consecutive integer inputs.

  • Connection to Class Number Theory: The behavior of such prime-producing quadratic polynomials is deeply connected to the theory of class numbers in imaginary quadratic fields. The fact that 2k2+29 (and other similar polynomials like Euler's k2+k+41) produce so many primes is not a coincidence but is tied to specific properties of the corresponding quadratic fields.

  • Educational and Recreational Mathematics: These polynomials are frequently used in number theory courses and popular science to demonstrate the elusive nature of prime number distribution and the intriguing patterns that can emerge. They serve as excellent examples to explore the question of "prime-generating formulas."

  • In Popular Culture: The sequence of primes generated by 2k2+29 has even appeared in popular culture, such as in Ken Follett's novel "Code to Zero."

Prime-Producing Potential:

  • The polynomial P(k)=2k2+29 generates prime numbers for a remarkable number of consecutive integer values of k. Specifically, it produces primes for k=0,1,2,28. This means it generates 29 consecutive primes starting from .

  • Let's list the first few:

    • P(0)=2×02+29=29 (prime)

    • P(1)=2×12+29=31 (prime)

    • P(2)=2×22+29=37 (prime)

    • P(3)=2×32+29=47 (prime)

    • ...and so on, up to P(28).

  • For k=29P(29)=2×292+29=29(2×29+1)=29×59which is a composite number. This illustrates the general principle that no such polynomial can produce primes indefinitely.

In summary, Legendre's polynomial 2k2+29 is a notable discovery in number theory, demonstrating an impressive string of prime outputs for consecutive integer inputs. Its significance lies in its historical context alongside other prime-generating polynomials like Euler's, its connection to deeper number theoretic concepts like class numbers, and its role as a compelling example in the study of prime numbers.

The polynomial popped up because of a reference to it in OEIS A241554: composite numbers of the form 2k2+29. The number associated with my diurnal age today, 27877, is a member of this sequence:If k=1182k2+29=2×1182+29=27877=61×457When this polynomial is not busy churning out primes, it is busy churning out semiprimes. In fact, it is only when k=185 that we get a number that is not a prime or a semiprime:If k=1852k2+29=2×1852+29=68479=31×472Follow this permalink to generate a table of these numbers and their factors. Here is a list of the members of OEIS A241554 between 1 and 40000:

1711, 1829, 2077, 2479, 3071, 3901, 5029, 6527, 6757, 7471, 7967, 8479, 10397, 10981, 11581, 14141, 15167, 15517, 15871, 16591, 16957, 17701, 18079, 18847, 19631, 20837, 22927, 23791, 25567, 26941, 27877, 28829, 29797, 30287, 31279, 31781, 32287, 35941, 38117

The table below shows the factorisations of the previous numbers as well as the corresponding k values:

  k     2*k^2+29   factors

  29    1711       29 * 59
  30    1829       31 * 59
  32    2077       31 * 67
  35    2479       37 * 67
  39    3071       37 * 83
  44    3901       47 * 83
  50    5029       47 * 107
  57    6527       61 * 107
  58    6757       29 * 233
  61    7471       31 * 241
  63    7967       31 * 257
  65    8479       61 * 139
  72    10397      37 * 281
  74    10981      79 * 139
  76    11581      37 * 313
  84    14141      79 * 179
  87    15167      29 * 523
  88    15517      59 * 263
  89    15871      59 * 269
  91    16591      47 * 353
  92    16957      31 * 547
  94    17701      31 * 571
  95    18079      101 * 179
  97    18847      47 * 401
  99    19631      67 * 293
  102   20837      67 * 311
  107   22927      101 * 227
  109   23791      37 * 643
  113   25567      37 * 691
  116   26941      29 * 929
  118   27877      61 * 457
  120   28829      127 * 227
  122   29797      83 * 359
  123   30287      31 * 977
  125   31279      31 * 1009
  126   31781      61 * 521
  127   32287      83 * 389
  134   35941      127 * 283
  138   38117      47 * 811

There are 103 primes in the range up to 40000 that are generated by this polynomial. These start with k=0:

29, 31, 37, 47, 61, 79, 101, 127, 157, 191, 229, 271, 317, 367, 421, 479, 541, 607, 677, 751, 829, 911, 997, 1087, 1181, 1279, 1381, 1487, 1597, 1951, 2207, 2341, 2621, 2767, 2917, 3229, 3391, 3557, 3727, 4079, 4261, 4447, 4637, 4831, 5231, 5437, 5647, 5861, 6079, 6301, 6991, 7229, 7717, 8221, 8741, 9007, 9277, 9551, 9829, 10111, 10687, 11279, 11887, 12197, 12511, 12829, 13151, 13477, 13807, 14479, 14821, 16229, 17327, 18461, 19237, 20029, 20431, 21247, 21661, 22079, 22501, 23357, 24229, 24671, 25117, 26021, 26479, 27407, 28351, 29311, 30781, 32797, 33311, 33829, 34351, 34877, 35407, 36479, 37021, 37567, 38671, 39229, 39791

Tuesday, 29 July 2025

Split and Add

There's a section in the Numbers Aplenty web page that divides a number into two smaller numbers and then adds the two together to form a new number with some interesting property. For example, the number associated with my diurnal age today is 27876 and Numbers Aplenty has this to say about it:

It can be divided in two parts (27 and 876) that added together give the 42nd triangular number, specifically: 

2787627+876=903=T42 

Normally I ignore this section of the page as the operation seems a little contrived and this was initially the case yesterday when I was searching for interesting properties associated with 27875. In frustration, I turned to Gemini for help and this is the rather long-winded prompt that I gave it:

I'm trying to find something of mathematical interest about the number 27875. I've looked at the entries for the number in the OEIS (Online Encyclopedia of Integer Sequences) at oeis.org and also the information located at Numbers Aplenty (https://www.numbersaplenty.com/27875). These are my usual sources of information about the number but I'm not satisfied with the information that I found there. I'm looking for some property of the number that is quirky, curious or unique. You'll have to apply some lateral thinking and creativity to come up with such a property. Remember that the property must be mathematical but it can fall into the category of recreational mathematics rather than academic mathematics. The number may have significance or importance in an area outside of mathematics such as physics, geography, demographics etc.

Here was Gemini's response:

A particularly curious property of 27875 emerges from a simple, recreational manipulation of its digits. The number 27875 can be split into two parts: the number formed by the first three digits, 278, and the number formed by the last two digits, 75. When you add these two parts together, you get a special result:

278+75=353

The sum, 353, is a palindromic prime number—it reads the same forwards and backwards, and its only divisors are 1 and itself. palindromic primes are relatively uncommon, and finding one through this kind of "split-sum" operation is a quirky feature.


Diving Deeper 🧐

The property becomes even more unique when we look at the prime number index.

  • The number 353 is the 71st prime number.

  • The index itself, 71, is also a prime number.

This makes 353 a prime index prime, adding another layer of mathematical interest to the result derived from 27875. 

So Gemini came up with a property of the number that was already on the Numbers Aplenty web page but it did add the additional information that the palindrome was prime and that this prime had a prime index. This got me thinking as to what other five digit numbers had the property that they could be split into two parts and have the two parts add together to form a prime number with a prime index.

I developed an algorithm (permalink) to find such numbers in the range from 27875 to 40000. It turns out that there are 83 such numbers with one of them (29162) able to be split in two different ways:2916229+162=191=P4329162291+62=353=P71Here is a list of the 83 numbers:

27875, 27892, 27974, 28163, 28172, 28271, 28325, 28469, 28568, 28667, 28766, 28769, 28865, 28891, 28964, 29162, 29162, 29261, 29324, 29459, 29558, 29657, 29756, 29768, 29855, 29954, 31142, 31241, 31322, 31439, 31538, 31637, 31736, 31766, 31835, 31888, 31934, 32132, 32159, 32231, 32321, 32429, 32528, 32627, 32726, 32765, 32825, 32887, 32924, 33122, 33158, 33221, 33419, 33518, 33617, 33716, 33764, 33815, 33886, 33914, 34112, 34157, 34211, 34319, 34763, 34885, 35156, 35318, 35762, 35884, 36155, 36317, 36761, 36883, 37154, 37316, 37882, 38153, 38315, 38759, 38881, 39152, 39314, 39758

The details are as follows:

number   first   second   palindrome   prime index

  27875    278     75       353          71
  27892    27      892      919          157
  27974    279     74       353          71
  28163    28      163      191          43
  28172    281     72       353          71
  28271    282     71       353          71
  28325    28      325      353          71
  28469    284     69       353          71
  28568    285     68       353          71
  28667    286     67       353          71
  28766    287     66       353          71
  28769    28      769      797          139
  28865    288     65       353          71
  28891    28      891      919          157
  28964    289     64       353          71
  29162    29      162      191          43
  29162    291     62       353          71
  29261    292     61       353          71
  29324    29      324      353          71
  29459    294     59       353          71
  29558    295     58       353          71
  29657    296     57       353          71
  29756    297     56       353          71
  29768    29      768      797          139
  29855    298     55       353          71
  29954    299     54       353          71
  31142    311     42       353          71
  31241    312     41       353          71
  31322    31      322      353          71
  31439    314     39       353          71
  31538    315     38       353          71
  31637    316     37       353          71
  31736    317     36       353          71
  31766    31      766      797          139
  31835    318     35       353          71
  31888    31      888      919          157
  31934    319     34       353          71
  32132    321     32       353          71
  32159    32      159      191          43
  32231    322     31       353          71
  32321    32      321      353          71
  32429    324     29       353          71
  32528    325     28       353          71
  32627    326     27       353          71
  32726    327     26       353          71
  32765    32      765      797          139
  32825    328     25       353          71
  32887    32      887      919          157
  32924    329     24       353          71
  33122    331     22       353          71
  33158    33      158      191          43
  33221    332     21       353          71
  33419    334     19       353          71
  33518    335     18       353          71
  33617    336     17       353          71
  33716    337     16       353          71
  33764    33      764      797          139
  33815    338     15       353          71
  33886    33      886      919          157
  33914    339     14       353          71
  34112    341     12       353          71
  34157    34      157      191          43
  34211    342     11       353          71
  34319    34      319      353          71
  34763    34      763      797          139
  34885    34      885      919          157
  35156    35      156      191          43
  35318    35      318      353          71
  35762    35      762      797          139
  35884    35      884      919          157
  36155    36      155      191          43
  36317    36      317      353          71
  36761    36      761      797          139
  36883    36      883      919          157
  37154    37      154      191          43
  37316    37      316      353          71
  37882    37      882      919          157
  38153    38      153      191          43
  38315    38      315      353          71
  38759    38      759      797          139
  38881    38      881      919          157
  39152    39      152      191          43
  39314    39      314      353          71
  39758    39      758      797          139

29162 occurs 2 times
29162 occurs 2 times

Friday, 25 July 2025

27872: Another Palindromic Number


For the last 800 days they've been coming around every 100 days and today marks yet another palindromic day 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. After that, it is only 31 days to the next palindromic day: 30003.

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)