Problems & Puzzles: Puzzles

Puzzle 785. Extend this table

Emmanuel Vantieghem sent the following nice puzzle.

 

Let  S(m,k)  be the sum of the digits of  m  in the number base  10^k. Those numbers are easy to compute.

 

For instance, when  m = 1234567:
 

   S(m,1) = 1+2+3+4+5+6+7 = 21

   S(m,2) = 1+23+45+67 = 136

   S(m,3) = 1+234+567 = 938

   S(m,4) = 123+4567 = 4690

   S(m,5) = 12+34567 = 34579

   S(m,6) = 1+234567 = 234568

   S(m,7) = S(m,8) = ... = m.

 

Let  L  be the integer length of  m  and  N  the number of  m  such that  S(m,k)  is prime for every  k >= 1.  Then I got the following table :

 

L     N

1      4

2      10

3      24

4      33

5      43

6      59

7      89

8      49

9      67

10    27

11    22

12    14

13    8

14    2

15    ?

 

Example:

For L=3, the 24 solutions are:

101, 227, 229, 241, 269, 281, 401, 409, 443, 449, 463, 467, 601, 607, 641, 647, 661, 683, 809, 821, 823, 829, 863, 881

 

The biggest m for L=14 is actually  68804868400243.

 

Q1. Can anyone confirm these results?

Q2. Are there such m with integer length 15 or higher?

 


Contributions came from Giovanni Resta & Jan van Delden.

***

Giovanni wrote:

I can confirm the results of Emmanuel Vantieghem,
except for N=6 where I got 58 primes instead of 59.
(The other 14-digits prime is 48842200688209).

I also extended the search to primes of 15, 16, and 17 digits without finding new values.

***

Jan wrote:

Q1: For L>1 my routine checks numbers having all digits even, except the last, this one must be in the set {1,3,7,9}.
The only primes this routine misses are the trivial solutions for L=1 and the primes of the form 10^(2^k)+1.
Only 11 and 101 are known.
 
I found the same results, except for L=6: I found 58 solutions. For L=15,16,17: 0 solutions.
 
I also calculated the sums T(m,k) where the numbers base 10^k are cut “from the left side”:
 

For instance, when  m = 1234567:
 

   T(m,1) = 1+2+3+4+5+6+7 = 21

   T(m,2) = 12+34+56+7 = 109

   T(m,3) = 123+456+7 = 586

   T(m,4) = 1234+567 = 1801

   T(m,5) = 12345+67 = 12412

   T(m,6) = 123456+7 = 123463

   T(m,7) = T(m,8) = ... = m.


The # solutions N(L) = [4,10,23,32,38,45,39,36,36,17,17,11,5,2,0,0]
The 2 solutions for L=14 are 20620022424409 and 60000080880683

***

Records   |  Conjectures  |  Problems  |  Puzzles