A342962 a(n) is the least prime that starts a string of exactly n distinct primes p_1, p_2, ..., p_n where p_{i+1} = p_i+A085563(p_i), but p_n+A085563(p_n) is either not prime or equal to p_n.
2, 29, 229, 5639, 35969, 54191353
Offset: 1
Examples
a(3) = 229 because 229, 229+A085563(229) = 233, and 233+A085563(233) = 241 are prime but 241+A085563(241) = 243 is not.
Programs
-
Maple
f:= n -> n + convert(select(isprime,convert(n,base,10)),`+`): F:= proc(n) option remember; local t,x; x:= f(n); if x = n or not isprime(x) then 1 else 1+procname(x) fi end proc: V:= Vector(6): count:= 0: p:= 1: while count < 6 do p:= nextprime(p); v:= F(p); if v <= 6 and V[v] = 0 then V[v]:= p; count:= count+1 fi od: convert(V,list);
Comments