Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A124232
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A124232 Numbers n such that prime(n) and pi(n) are palindromic. +0
1
1, 2, 3, 4, 5, 26, 32, 36, 138, 3691, 6987, 7193, 86969, 117766, 127150, 142583, 515786, 531448, 539596, 615980, 646060, 17262354, 39816443, 47548105, 48803361, 49426747, 528977302, 538348374, 1475057753, 1559827952, 2994135736 (list; graph; listen)
OFFSET

1,2

MATHEMATICA

NextPalindrome[n_] := Block[{lg = Floor@ Log[10, n] + 1, idn = IntegerDigits@n}, If[Union@ idn == {9}, Return[n + 2], If[lg < 2, Return[n + 1], If[ FromDigits@ Reverse@ Take[idn, Ceiling[lg/2]] > FromDigits@ Take[idn, -Ceiling[lg/2]], FromDigits@ Join[ Take[idn, Ceiling[lg/2]], Reverse@ Take[idn, Floor[lg/2]]], idfhn = FromDigits@ Take[idn, Ceiling[lg/2]] + 1; idp = FromDigits@ Join[IntegerDigits@ idfhn, Drop[ Reverse@ IntegerDigits@ idfhn, Mod[lg, 2]]] ]]]];

palQ[n_Integer] := Module[{idn = IntegerDigits@n}, idn == Reverse@ idn]; lst = {}; k = 1; While[k < 10^12, If[ PrimeQ@k && palQ@PrimePi@PrimePi@k, Print@PrimePi@k; AppendTo[lst, PrimePi@k]]; k = NextPalindrome@k]; lst (* Robert G. Wilson v *)

CROSSREFS

Subsequence of A075807 = numbers n such that n-th prime is palindromic.

Sequence in context: A080695 A088865 A075807 this_sequence A051143 A084853 A115337

Adjacent sequences: A124229 A124230 A124231 this_sequence A124233 A124234 A124235

KEYWORD

base,nonn

AUTHOR

Tanya Khovanova (tanyakh(AT)yahoo.com), Dec 13 2006

EXTENSIONS

a(22) - a(26) from Robert G. Wilson v (rgwv(at)rgwv.com), Dec 14 2006

a(27) - a(31) from Robert G. Wilson v (rgwv(AT)rgwv.com), Dec 14 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research