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!)
A046941 Palindromic primes whose indices n are also palindromes. 6
2, 3, 5, 7, 11, 143787341, 11853735811, 126537757735621 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Chris K. Caldwell and G. L. Honaker, Jr., 143787341
Carl Pomerance, What we still don't know about addition and multiplication, Trjitzinsky Lecture 1, U. Illinois Urbana-Champaign, November 27, 2018. See slides 22 & 24.
Eric Weisstein's World of Mathematics, Palindromic Prime.
FORMULA
a(n) = prime(A046942(n)).
MATHEMATICA
NextPalindrome[n_] := Block[ {l = Floor[ Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[ idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[ idn, Ceiling[l/2]]]] FromDigits[ Take[ idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[ idn, Ceiling[l/2]], Reverse[ Take[ idn, Floor[l/2]]] ]], idfhn = FromDigits[ Take[ idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]] ]]]];
p = 0; Do[p = NextPalindrome[p]; While[ !PrimeQ[p], p = NextPalindrome[ p]]; q = IntegerDigits[ PrimePi[ p]]; If[Reverse[q] == q, Print[{p, FromDigits[q]}]], {n, 10^4}] (* Robert G. Wilson v, Feb 03 2005 *)
palQ[n_] := Reverse[x = IntegerDigits[n]] == x; t = {}; Do[p = Prime[i]; If[palQ[i] && palQ[p], AppendTo[t, p]], {i, 9*10^6}]; t (* Jayanta Basu, Jun 23 2013 *)
PROG
(PARI) ispal(n) = my(d=digits(n)); d == Vecrev(d);
isok(p) = isprime(p) && ispal(p) && ispal(primepi(p)); \\ Michel Marcus, Jan 27 2019
CROSSREFS
Sequence in context: A114835 A091689 A046482 * A116692 A114983 A118950
KEYWORD
nonn,base,more
AUTHOR
EXTENSIONS
a(7) from Giovanni Resta, May 14 2003
a(8) from Giovanni Resta, Aug 10 2019
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 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)