login
Least positive integer which starts a chain of exactly n primes under the map p -> p+p'+p'', where p' = least prime > p.
1

%I #35 Apr 03 2023 10:36:13

%S 1,2,17,11,5,7,2543,249217,1783841,2494517,624921844601,507995698619

%N Least positive integer which starts a chain of exactly n primes under the map p -> p+p'+p'', where p' = least prime > p.

%C Restricting the terms to be odd primes, the initial term would be a(1)=3.

%H J. K. Andersen, <a href="https://t5k.org/curios/page.php/507995698619.html">Curio for 507995698619</a>, in C. Caldwell's "prime pages".

%H P. Carmody, <a href="http://groups.yahoo.com/group/primenumbers/message/25152">three-prime sum chains</a>, "primenumbers" group on Yahoo!

%H Phil Carmody, Jens Kruse Andersen and others, <a href="/A226291/a226291.txt">three-prime sum chains</a>, digest of 7 messages in primenumbers Yahoo group, Jun 2 - Jun 4, 2013.

%H Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_421.htm">Puzzle 421. Staircase of consecutive primes</a>, The Prime Puzzles & Problems Connection.

%e Let f(x)=x+x'+x'', where x' = nextprime(x), the next larger prime.

%e Depending on the starting value, we get:

%e 1 (not prime): 0 primes in the chain (as with any other composite starting value), a(0)=1.

%e 2 -> f(2) = 2+3+5 = 10 (not prime): chain of 1 prime, a(1) = 2.

%e 3 -> f(3) = 3+5+7 = 15 (not prime): chain of 1 prime.

%e 5 -> f(5) = 5+7+11 = 23 -> f(23) = 23+29+31 = 83 -> f(83) = 269 -> 817 (not prime): chain of 4 primes, a(4)=5.

%e 7 -> 31 -> 109 -> 349 -> 1061 -> 3193 (not prime): chain of 5 primes, a(5)=7.

%e 11 -> 41 -> 131 -> 407 (not prime): chain of 3 primes, a(3)=11.

%e 13 -> 49 (not prime): chain of 1 prime.

%e 17 -> 59 -> 187 (not prime): chain of 2 primes: a(2) = 17.

%o (PARI) a(n)={n>1&&forprime(p=1,,my(pp=p); for(i=0,n,isprime(pp=pp+0+nextprime(1+pp=nextprime(pp+1))+pp)==(i<n)||next(2)); return(p));2}

%K nonn

%O 0,2

%A _M. F. Hasler_, Jun 02 2013