login
A032596
Second of three consecutive palindromes all of which are prime.
3
1879781, 1880881, 1969691, 3590953, 7820287, 108494801, 159191951, 160707061, 175101571, 187101781, 316696613, 319404913, 725595527, 728898827, 731909137, 904090409, 921202129, 930505039, 987202789, 987494789, 10456965401, 10745054701
OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
PROG
(PARI) nxt(n)=my(d=digits(n)); i=(#d+1)\2; while(i&&d[i]==9, d[i]=0; d[#d+1-i]=0; i--); if(i, d[i]++; d[#d+1-i]=d[i], d=vector(#d+1); d[1]=d[#d]=1); sum(i=1, #d, 10^(#d-i)*d[i]) \\ From David A. Corneth at A002113
list(lim)=my(v=List(), p=1, q=2, r=3); while(q<=lim\=1, if(isprime(r), if(isprime(q), if(isprime(p), listput(v, q)); p=q; q=r; r=nxt(r), q=nxt(p=r); r=nxt(q)), q=nxt(p=nxt(r)); r=nxt(q))); Vec(v) \\ Charles R Greathouse IV, Aug 11 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, May 15 1998
EXTENSIONS
New name from Charles R Greathouse IV, Aug 11 2021
STATUS
approved