login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A032595 First of three consecutive palindromes all of which are prime. 5
1878781, 1879781, 1968691, 3589853, 7819187, 108484801, 159181951, 160696061, 175090571, 187090781, 316686613, 319393913, 725585527, 728888827, 731898137, 904080409, 921191129, 930494039, 987191789, 987484789, 10456865401, 10744944701 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
2,3,5 are palindromes, and consecutive primes, but they are not consecutive palindromes.
2,3,4 are consecutive palindromes, but they are not all primes.
The first time there are three consecutive palindromes which are all primes is 1878781, 1879781, 1880881. - N. J. A. Sloane, Aug 12 2021
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(p<=lim\=1, if(isprime(r), if(isprime(q), if(isprime(p), listput(v, p)); 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
Sequence in context: A145276 A251008 A064820 * A230806 A032596 A032597
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, May 15 1998
EXTENSIONS
New name from Charles R Greathouse IV, Aug 11 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)