Problems & Puzzles: Puzzles
|
Problems & Puzzles: Puzzles
From Jan 31to Feb 5, 2026, contributions came from Gennady Gusev, Emmanuel Vantieghem, Simon Cavegn, Oscar Volpatti *** Gennady wrote:
12 [59393313971, 53, 101, 193, 383, 757, 1511, 3019, 6037, 12071, 24133,
48259, 96517]
13 [7117113335317, 43, 79, 157, 313, 619, 1237, 2473, 4943, 9883,
19763, 39521, 79039, 158077]
14 [171355597959913, 79, 157, 307, 613, 1223, 2441, 4877, 9749, 19489,
38971, 77933, 155861, 311713, 623417]
15 [799353955313539, 79, 151, 293, 577, 1151, 2297, 4591, 9173, 18341,
36677, 73351, 146701, 293399, 586793,1173583]
16 [395377199771711897, 101, 199, 389, 773,
1543, 3079, 6151, 12301, 24593, 49177, 98347, 196687, 393373,
786739,1573477,3146953]
17 [33793799795555374999,
127, 251, 499, 991, 1973, 3943, 7879, 15749, 31489, 62971, 125933,
251861, 503717, 1007429, 2014853, 4029703, 8059399]
18 [337939599555553791889,
127, 251, 499, 991, 1973, 3943, 7877, 15749, 31489, 62969, 125933,
251861, 503717, 1007429, 2014853, 4029703, 8059399, 16118789]
*** Emanuel wrote:
13,
7117113335317 {43, 79, 157, 313, 619, 1237, 2473, 4943, 9883, 19763,
39521, 79039, 158077}
14,171355597959913 {79, 157, 307, 613, 1223, 2441, 4877, 9749, 19489, 38971, 77933, 155861, 311713, 623417} 15, 799353955313539 {79, 151, 293, 577, 1151, 2297, 4591, 9173, 18341, 36677, 73351, 146701, 293399, 586793, 1173583} The next term will be > 11111111111111153 and may take more than 25 times the time that I used up to now to find my solutions.
So, I decided to stop here.
*** Simon wrote: 12: [59393313971, 53, 101, 193, 383, 757, 1511, 3019, 6037, 12071, 24133, 48259, 96517]13: [7117113335317, 43, 79, 157, 313, 619, 1237, 2473, 4943, 9883, 19763, 39521, 79039, 158077] *** Oscar wrote:
I found six more terms (13th to 18th).
13 [7117113335317, 43, 79, 157, 313, 619, 1237, 2473, 4943, 9883, 19763, 39521, 79039, 158077] 14 [171355597959913, 79, 157, 307, 613, 1223, 2441, 4877, 9749, 19489, 38971, 77933, 155861, 311713, 623417] 15 [799353955313539, 79, 151, 293, 577, 1151, 2297, 4591, 9173, 18341, 36677, 73351, 146701, 293399, 586793, 1173583] 16 [395377199771711897, 101, 199, 389, 773, 1543, 3079, 6151, 12301, 24593, 49177, 98347, 196687, 393373, 786739, 1573477, 3146953] 17 [33793799795555374999, 127, 251, 499, 991, 1973, 3943, 7879, 15749, 31489, 62971, 125933, 251861, 503717, 1007429, 2014853, 4029703, 8059399] 18 [33793799795555379859, 127, 251, 499, 991, 1973, 3943, 7879, 15749, 31489, 62971, 125933, 251861, 503717, 1007429, 2014853, 4029703, 8059399, 16118789] Search strategy. Let p be a m-digit prime; label its digits as d_1,d_2,...,d_m, where d_1 is the most significant digit of number p. The first sum of the process is simply the digit sum of number p: s_1 = d_1+...+d_m. Then we replace addendum d_1 with s_1, so: s_2 = (s_1-d_1)+s_1 = 2*s_1-d_1. Then we replace addendum d_2 with s_2, so: s_3 = (s_2-d_2)+s_2 = 2*s_2-d_2. And so on up to the sum with index m+1. After that, next addendum to be replaced will be starting sum s_1. My program tries to force a run of j consecutive primes, with j<=m, by: choosing a prime value s_1 < 9*m as the target digit sum; choosing the j-1 most significant digits in order to obtain j-1 more primes s_2...s_j. Stated bound j<=m is due to the fact that least significant digit d_m can't be freely chosen but it must match target digit sum constraint. If bound j=m is reached, next few terms of the process are computed, until a composite sum is found.
What about 19th term of the sequence?
Prime s_1 = 127 allows to force a run of 18 consecutive primes at most.
We can't improve such result until we reach prime s_1 = 219187531, which
finally allows to force a run of 20 consecutive primes, by choosing
digits d_1...d_19 in six different ways:
p = 9597713537793933911... r = 219187430. p = 9599313537793933911... r = 219187432. p = 9917713537793933911... r = 219187434. p = 9919313537793933911... r = 219187436. p = 9933713537793933911... r = 219187436. p = 9935313537793933911... r = 219187438.
In each case, r is the residual sum of the remaining digits.
However, numbers with such huge digit sum must have more than 24 million
digits!
Primality tests are still feasible, but they are extremely slow on my
hardware, so I did't attempt to identify a prime candidate.
... (CR) well, we have a nice (or bad?) surprise: Both Gennady Gusev & Oscar Volpatti found distinct solutions with 18 terms, but the initial prime of Oscar is smaller than the Gennady's one. I have verified and both are prime numbers but the one provided by Oscar is smaller. 33793799795555379859 (Oscar, 20 digits, it is prime) So, according to the rule of the puzzle, "the minimum prime k that produces a run of exactly n consecutive primes", the one provided by Oscar should be considered the correct one. Somehow Gennady jumped over the prime provided by Oscar. Just in case, I would like to ask very respectfully to Oscar to verify that ALL the intermediate calculations steps for the sequence of his initial prime, 33793799795555379859, are correct to produce the 18 terms. No offence intended... ***
|
|||
|
|||