login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A046941 Primes p(n) which are palindromes and their indices n are also palindromes. 6
2, 3, 5, 7, 11, 143787341, 11853735811 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..7.

Eric Weisstein's World of Mathematics, Palindromic Prime.

FORMULA

a(n) = P_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}] (from 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 *)

CROSSREFS

Cf. A046942, A103357, A103358, A103402, A103403.

Sequence in context: A114835 A091689 A046482 * A116692 A114983 A118950

Adjacent sequences:  A046938 A046939 A046940 * A046942 A046943 A046944

KEYWORD

base,nonn

AUTHOR

Carlos Rivera

EXTENSIONS

11853735811 from Giovanni Resta, May 14 2003

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified November 27 17:39 EST 2014. Contains 250249 sequences.