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!)
A218343 a(n) is the largest n-digit palindromic integer surrounded by twin primes, if one exists, or 0 otherwise. 0
6, 0, 858, 2112, 89898, 276672, 8916198, 89522598, 898373898, 8998558998, 89984248998, 899931139998, 8999867689998, 89999400499998, 899998808899998, 8999950220599998, 89999961316999998, 899999985589999998, 8999999741479999998, 89999993611639999998 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
The prime puzzles, Puzzle 659
PROG
(PARI) a(n)=my(p, t, v, k, j, d, N=n-1); if(n==1, 6, if(n==2, 0, t=9*10^(N\2); d=6*11^(N%2); forstep(k=t, 0, -1, v=digits(k); v=concat(v, vecextract(Vecrev(v), concat(Str((N+1)%2+1), ".."))); p=subst(Pol(v), x, 10); if(p%d==0&&ispseudoprime(p+1)&&ispseudoprime(p-1), return(p)))))
CROSSREFS
Sequence in context: A179936 A219952 A156444 * A122192 A357801 A249698
KEYWORD
nonn,base
AUTHOR
Igor Schein, Oct 26 2012
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 05:20 EDT 2024. Contains 371906 sequences. (Running on oeis4.)