Problems & Puzzles: Puzzles

Puzzle 1005. Palprimes from prime factors of consecutive integers

Fausto Morales sent the following nice puzzle:

 

The purpose of this puzzle is to find palprimes obtainable by ordering the combined set of prime factors from a run of consecutive integers, and concatenating them.
 

For instance, consider the prime factorizations of 999998, 999999 and 1000000:
 

999998 = 2.31.127.127

999999 = 3.3.3.7.11.13.37

1000000 = 2.2.2.2.2.2.5.5.5.5.5.5
 

Then, one such transformation is:

 

37.31.127.2.13.5.2.2.5.5.2.5.5.2.2.5.3.127.2.11.3.7.3  ->
 

3731127213522552552253127211373  (Prime).

 

Q1: Find a smaller palprime of this type, preferably the minimal one.

 

Q2 Are there any palprimes resulting from applying the same transformation to just a pair of consecutive integers?

 

Q3: Send your largest palprime constructible in this way.

 

Q4: Send your palprime resulting from the longest run of consecutive integers.

 

 


During the week 14-20, June, 2020, contributions came from Paul Cleary, Metin Sariyar, Ray Opao, Fausto Morales, Oscar Volpatti and Emmanuel Vantieghem.

***

Paul wrote:

Q2 and maybe the first one answers  Q1

 

 

73 = {73}

74 = {2,37}

Possible transformations {{73,2,37},{37,2,73}}

Palprime/s = {73237,37273}

 

126 = {2,3,3,7}

127 = {127}

Possible transformations {{3,7,2,127,3}}

Palprime/s = {3721273}

 

147 = {3,7,7}

148 = {2,2,37}

Possible transformations {{7,3,2,7,2,37}}

Palprime/s = {7327237}

 

312 = {2,2,2,3,13}

313 = {313}

Possible transformations {{3,13,2,2,2,313},{313,2,2,2,3,13}}

Palprime/s = {313222313,313222313}

 

735 = {3,5,7,7}

736 = {2,2,2,2,2,23}

Possible transformations {{3,2,2,7,2,5,2,7,2,23}}

Palprime/s = {32272527223}

 

1149 = {3,383}

1150 = {2,5,5,23}

Possible transformations {{3,2,5,383,5,23}}

Palprime/s = {325383523}

 

1242 = {2,3,3,3,23}

1243 = {11,113}

Possible transformations {{113,2,3,3,3,23,11},{113,23,3,3,2,3,11}}

Palprime/s = {11323332311,11323332311}

 

1421 = {7,7,29}

1422 = {2,3,3,79}

Possible transformations {{3,29,7,7,79,2,3}}

Palprime/s = {329777923}

 

1532 = {2,2,383}

1533 = {3,7,73}

Possible transformations {{3,7,2,383,2,73},{73,2,383,2,3,7}}

Palprime/s = {372383273,732383237}

 

1777 = {1777}

1778 = {2,7,127}

Possible transformations {{7,2,1777,127}}

Palprime/s = {721777127}

 

1799 = {7,257}

1800 = {2,2,2,3,3,5,5}

Possible transformations {{3,7,5,2,2,5,2,257,3}}

Palprime/s = {37522522573}

 

2700 = {2,2,3,3,3,5,5}

2701 = {37,73}

Possible transformations {{3,5,2,37,3,73,2,5,3},{73,2,3,5,3,5,3,2,37},{73,3,2,5,3,5,2,3,37},{73,5,3,2,3,2,3,5,37}}

Palprime/s = {35237373253,73235353237,73325352337,73532323537}

 

3723 = {3,17,73}

3724 = {2,2,7,7,19}

Possible transformations {{73,2,7,19,17,2,3,7}}

Palprime/s = {73271917237}

 

4625 = {5,5,5,37}

4626 = {2,3,3,257}

Possible transformations {{37,5,2,5,3,5,257,3},{3,5,257,37,5,2,5,3}}

Palprime/s = {37525352573,35257375253}

 

4913 = {17,17,17}

4914 = {2,3,3,3,7,13}

Possible transformations {{7,17,13,3,2,3,3,17,17}}

Palprime/s = {7171332331717}

 

4991 = {7,23,31}

4992 = {2,2,2,2,2,2,2,3,13}

Possible transformations {{3,2,2,2,2,13,7,31,2,2,2,23},{13,23,2,2,2,7,2,2,2,3,2,31},{13,2,3,2,2,2,7,2,2,23,2,31},{13,3,2,2,2,2,7,2,2,2,23,31}}

Palprime/s = {322221373122223,132322272223231,132322272223231,133222272222331}

 

...

 

This is not an answer to any question, just something of interest.  The No 25920 and 25921 produce the following list of Palprimes.

 

25920 = {2,2,2,2,2,2,3,3,3,3,5}

25921 = {7,7,23,23}

 

Possible transformations.

 

{{3,2,2,2,3,7,3,2,5,23,7,3,2,2,23},{3,2,2,2,7,23,3,5,3,3,2,7,2,2,23},{3,2,2,23,7,3,2,5,2,3,7,3,2,2,23},{3,2,2,23,7,3,2,5,23,7,3,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2,5,2,3,2,23,23,7},{7,3,2,3,2,2,3,2,5,23,2,2,3,23,7},{7,3,2,3,2,2,3,2,5,23,2,23,2,3,7},{7,3,2,3,2,23,2,5,2,3,2,2,3,23,7},
{7,3,2,3,2,23,2,5,2,3,2,23,2,3,7},{7,3,2,3,2,23,2,5,23,2,2,3,2,3,7},{7,3,2,23,2,3,2,5,2,3,2,3,2,23,7},{7,3,2,23,2,3,2,5,2,3,23,2,2,3,7},
{7,3,2,23,2,3,2,5,23,2,3,2,2,3,7},{7,3,2,23,23,2,5,2,3,2,3,2,2,3,7},{7,3,3,2,2,3,2,2,5,2,23,2,23,3,7},{7,3,3,2,23,2,2,5,2,2,3,2,23,3,7},
{7,3,3,2,23,2,2,5,2,23,2,2,3,3,7},{7,3,23,2,2,3,2,5,2,3,2,2,3,23,7},{7,3,23,2,2,3,2,5,2,3,2,23,2,3,7},{7,3,23,2,2,3,2,5,23,2,2,3,2,3,7},
{7,3,23,2,23,2,5,2,3,2,2,3,2,3,7},{7,23,3,3,2,2,2,5,2,2,23,3,3,2,7}}

 

Palprime/s =

 

{32223732523732223,32227233533272223,32223732523732223,32223732523732223,32322732523722323,32322732523722323,
32322732523722323,32327322522372323,32327322522372323,32327322522372323,33272322522327233,33272322522327233,
33272322522327233,33237222522273233,37222332523322273,37232223532223273,37232223532223273,37232223532223273,
32322732523722323,32322732523722323,32322732523722323,32327322522372323,32327322522372323,32327322522372323,
72233232523233227,72233232523233227,72233232523233227,72233232523233227,72233232523233227,72233232523233227,
73223232523232237,73223232523232237,73223232523232237,73223232523232237,73223232523232237,73223232523232237,
73232232523223237,73232232523223237,73232232523223237,73232232523223237,73232232523223237,73232232523223237,
73223232523232237,73223232523232237,73223232523232237,73223232523232237,73322322522322337,73322322522322337,
73322322522322337,73232232523223237,73232232523223237,73232232523223237,73232232523223237,72333222522233327}

 

***

Metin wrote:

Q1&Q2: 
The ones I found are:
 
73*74 = 5402 = 2 x 37 x 73 and 37273 is prime.
799993*799994 = 2 x 399997 x 799993   and 3999972799993 is prime.

***

Ray wrote:

Here's what I got using some lines of Python:

 
Q2: For a pair of consecutive integers, the smallest I found was:
73 = 73
74 = 2 x 37
2 ways of arranging:
37.2.73 = 37273 (Prime)
73.2.37 = 73237 (Prime)

 
Q4: Longest run so far is 4 consecutive integers:
72 = 2 x 2 x 2 x 3 x 3
 
73 = 73
74 = 2 x 37
75 = 3 x 5 x 5
8 ways of arranging:
3.5.2.73.2.3.2.37.2.5.3 = 3527323237253 (Prime)
3.37.5.2.2.3.2.2.5.73.3 = 3375223225733 (Prime)
3.5.2.37.2.3.2.73.2.5.3 = 3523723273253 (Prime)
3.2.73.2.5.3.5.2.37.2.3 = 3273253523723 (Prime)
3.5.73.2.2.3.2.2.37.5.3 = 3573223223753 (Prime)
37.5.3.2.2.3.2.2.3.5.73 = 3753223223573 (Prime)
3.5.37.2.2.3.2.2.73.5.3 = 3537223227353 (Prime)
37.2.5.3.2.3.2.3.5.2.73 = 3725323235273 (Prime)
 

I'll update you if I find a longer run.

 

Q1: The smallest palprime so far that I have found for 3 successive integers:
488 = 2 x 2 x 2 x 61
489 = 3 x 163
490 = 2 x 5 x 7 x 7
163.2.7.2.5.2.7.2.3.61 =  1632725272361 (Prime)

 

***

Fausto wrote:

Q1 & Q2

 
The prime factor decompositions of the two consecutive integers 9800 and 9801:

 
9800 = 2.2.2.5.5.7.7
9801 = 3.3.3.3.11.11

 
can be combined and arranged as

 
11.2.3.5.7.3.2.3.7.5.3.2.11

 
and then concatenated to produce the following palprime:

 
112357323753211

 
(No claim that it is minimal).

 

 
Q3 & Q4

 
The prime factor decompositions of the 26 consecutive integers from 12 to 37:

 
2.2.3, 13, 2.7, 3.5, 2.2.2.2, 17, 2.3.3, 19, 2.2.5, 3.7, 2.11, 23, 2.2.2.3, 5.5, 2.13, 3.3.3, 2.2.7, 29, 2.3.5, 31, 2.2.2.2.2, 3.11, 2.17, 5.7, 2.2.3.3, 37

 
may be reordered as follows:

 
7.5.5.5.3.3.3.3.3.3.23.17.31.2.2.2.2.2.2.2.2.2.2.2.2.7.19.2.11.37.3.11.29.17.2.2.2.2.2.2.2.2.2.2.2.2.13.7.13.2.3.3.3.3.3.3.5.5.5.7

 
giving, upon concatenation, the following 71-digit palprime:

 
75553333332317312222222222227192113731129172222222222221371323333335557

...

I have an improvement for Q1:

 
312 = 3.13.2.2.2

 
and appending 313 (prime) to that factorization yields the smaller palprime:

 
313222313

 
which stands a good chance, both at being minimal, as well as a unique case of sequential concatenation of factors from consecutive integers (i.e., with no need to combine them first.).

 

***

Oscar wrote:

As a first step, I searched for the shortest palprimes resulting from runs of length 2-6.

 
Run length 2, 5 digits
run: 73 to 74
q = 2 * 37 * 73
pmin = [37,2,73]
pmax = [73,2,37]

 
Run length 3, 13 digits
run: 488 to 490
q = 2^4 * 3 * 5 * 7^2 * 61 * 163
pmin = [163,2,7,2,5,2,7,2,3,61]
run: 1658 to 1660
q =  2^3 * 3  * 5 * 7 * 79 * 83 * 829
pmax = [3,829,7,2,5,2,79,2,83]

 
Run length 4, 13 digits
run: 91 to 94
 
q = 2^3 * 3 * 7 * 13 * 23 * 31 * 47
pmin = [13,23,2,7,47,2,3,2,31]
run: 72 to 75
 
q = 2^4 * 3^3 * 5^2 * 37 * 73
pmax = [37,5,3,2,2,3,2,2,3,5,73]

 
Run length 5, 19 digits
run: 116 to 120
q = 2^6 * 3^3 * 5 * 7 * 13 * 17 * 29 * 59
pmin = [3,2,3,17,29,5,2,2,2,59,2,7,13,2,3]
run: 117 to 121
q = 2^4 * 3^3 * 5 * 7 * 11^2 * 13 * 17 * 59
pmax = [7,13,3,2,2,11,59,5,11,2,2,3,3,17]

 
Run length 6, 23 digits
 
Run: 116 to 121
q = 2^6 * 3^3 * 5 * 7 * 11^2 * 13 * 17 * 29 * 59
pmin = [11,2,2,29,5,3,3,17,2,7,13,3,59,2,2,2,11]
pmax = [7,13,2,2,29,5,3,11,2,11,3,59,2,2,2,3,17]

 

 
If we restrict our attention to runs of 3 consecutive integers, I slightly improved the solution from Fausto Morales.

 
Run length 3, 35 digits
 
run: 688127 to 688129
q = 2^15 * 3 * 7 * 11^4 * 13 * 43 * 47 * 1231
plow = [11,11,2,2,2,2,2,2,7,43,2,13,2,1231,2,3,47,2,2,2,2,2,2,11,11]
phigh = [3,47,2,2,2,2,2,2,11,11,2,13,2,1231,2,11,11,2,2,2,2,2,2,7,43]  

 
Run length 3, 39 digits
 
run: 16547839 to 16547841  
q = 2^15 * 3^3 * 5 * 7^2 * 11^2 * 19 * 101 * 2791 * 32257
plow = [11,19,7,2,2,2,2,3,2,32257,2,2,101,2,2,7,5,2,2,3,2,3,2,2,2,2791,11]
 
phigh = [7,5,2,2,3,3,11,2,2,2791,2,2,2,2,101,2,2,2,2,19,7,2,2,2,11,3,32257]

 

 
Finally, I searched for runs starting from the integer 2 

 
Run length 59, 159 digits
 
run: 2 to 60
q = 2^56 * 3^28 * 5^14 * 7^9 * 11^5 * 13^4 * 17^3 * 19^3 * 23^2 * 29^2 * 31 * 37 * 41 * 43 * 47 * 53 * 59
plow = 11111323114313291717329195322222222222222222222222222233333333333335575557755774775577555755333333333
3333222222222222222222222222222359192371719231341132311111

***

Emmanuel wrote:

Q1.
The smallest solution (if I made no mistakes) :
488*489*490 = 163*2*7*2*5*2*7*2*3*61 -> 1632725272361

Q2.
There are many solution.
The smallest I could find is
73*74 = 37*2*73 -> 37273
A bigger one is :
9800*9801 = 7*5*2*3*3*11*2*11*3*3*2*5*7
 -> 752331121133257


Q3.
The largest palprime I could find is obtained from Fausto's solution :
999998*999999*1000000 = 7*3*5*5*2*2*5*3*127*2*11*3*2*31*127*2*13*5*2*2*5*5*37 -> 7355225312721132311272135225537.

Q4.
Ten consecutives :
6*7*8*9*10*11*12*13*14*15 = 7*3*5*3*2*2*2*2*3*11*13*2*2*2*2*3*5*3*7 -> 735322223111322223537

***

Later on June 25, 2020, Oscar Volpatti wrote again:

I didn't submit the ordering of prime factors for my largest solution of puzzle 1005.
I'll fill the gap, with a nice six-rows formatting.

run: 2 to 60
q = 2^56 * 3^28 * 5^14 * 7^9 * 11^5 * 13^4 * 17^3 * 19^3 * 23^2 * 29^2 * 31 * 37 * 41 * 43 * 47 * 53 * 59
plow =
[11,11,13,23,11,43,13,29,17,17,3,29,19,53,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,7,5,5,5,7,7,5,5,7,7,
47,7,5,5,7,7,5,5,5,7,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,3,59,19,2,37,17,19,23,13,41,13,2,31,11,11]



I found Metin Sariyar's submission very interesting, as it showed the existence of an infinite family of candidate solutions with run length 2.
Given the m-digits numbers:
a37(m) = 4*10^(m-1) - 3 = 399..997,
a73(m) = 8*10^(m-1) - 7 = 799..993,
we can consider the run from a73(m) to a73(m)+1 = 2*a37(m), obtaining two candidate palindromes with n = 2*m+1 digits:
b33(n) = [a37(m),2,a73(m)],
b77(n) = [a73(m),2,a37(m)].
A heuristic argument suggests that these sequences contain infinitely many palprimes.

Up to 999 digits, there are eleven 
proven palprimes:
b33(5), known,
b77(5), known,
b77(9),
b33(13), found by Metin Sariyar
,
b33(89),
b77(181),
b33(245),
b77(249),
b77(721),
b77(857),
b77(997).

 
Up to 9999 digits, I found three more palindrome PRPs:
b77(2805),
b33(3517),
b77(6305).

However, as Fausto Morales asked to combine sets of prime factors, I suspect that all these candidates should be accepted only if the numbers a37(m) and a73(m) are both prime. Unfortunately, only the known solutions with length n=5 satisfy this constraint so far. 

 
b77(9) = 799323997, prime
 
a73(4) = 7993, prime
a37(4) = 3997 = 7*571, composite

 
b33(13) = 3999972799993, prime
 
a73(6) = 799993, prime
a37(6) = 399997 = 13*29*1061, composite

 
For the ten larger candidates found so far, both a37(m) and a73(m) are proven composites.

 

***

Records   |  Conjectures  |  Problems  |  Puzzles