login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A342958
a(n) is the least prime that starts a string of exactly n primes p_1, p_2, ... p_n where p_{i+1} = p_i-A003132(p_i), but p_n-A003132(p_n) is not prime.
1
2, 13, 547, 10559, 246349, 20020109, 20020163
OFFSET
1,1
COMMENTS
No further terms < 10^9.
EXAMPLE
a(3) = 547 because 547, 547-A003132(547) = 457, and 457-A003132(457) = 367 are prime, but 367-A003132(367) = 273 is not prime.
MAPLE
f:= proc(n) option remember; local t, x;
x:= n - add(t^2, t=convert(n, base, 10));
if not isprime(x) then 1 else 1+procname(x) fi
end proc:
V:= Vector(7): count:= 0: p:= 1:
while count < 7 do
p:= nextprime(p); v:= f(p);
if v <= N and V[v] = 0 then V[v]:= p; count:= count+1 fi
od:
convert(V, list);
CROSSREFS
KEYWORD
nonn,more,base
AUTHOR
J. M. Bergot and Robert Israel, Mar 31 2021
STATUS
approved