OFFSET
1,1
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
MATHEMATICA
seq={2}; Do[k=3; While[MemberQ[seq, k] || !PalindromeQ[k+seq[[-1]]], k = NextPrime[k]]; AppendTo[seq, k], {i, 1, 50}]; seq (* Amiram Eldar, Dec 04 2018 *)
PROG
(PARI)
ispal(n)={my(v=digits(n)); for(i=1, #v\2, if(v[i]<>v[#v+1-i], return(0))); 1}
seq(n)={my(v=vector(n), M=Map(), t=0); for(n=1, n, forprime(p=1, oo, if(!mapisdefined(M, p) && ispal(p+t), t=p; break)); mapput(M, t, 1); v[n]=t); v} \\ Andrew Howroyd, Dec 04 2018
CROSSREFS
KEYWORD
AUTHOR
Jason Earls, May 28 2003
STATUS
approved