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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002385 Palindromic primes: prime numbers whose decimal expansion is a palindrome.
(Formerly M0670 N0247)
141
2, 3, 5, 7, 11, 101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929, 10301, 10501, 10601, 11311, 11411, 12421, 12721, 12821, 13331, 13831, 13931, 14341, 14741, 15451, 15551, 16061, 16361, 16561, 16661, 17471, 17971, 18181 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Every palindrome with an even number of digits is divisible by 11, so 11 is the only member of the sequence with an even number of digits. - David Wasserman, Sep 09 2004

This holds in any number base A006093(n), n>1. - Lekraj Beedassy, Mar 07 2005

Subsequence of A188650; A188649(a(n)) = a(n); see A033620 for multiplicative closure. [Reinhard Zumkeller, Apr 11 2011]

REFERENCES

A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 228.

N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

Attila Olah, Table of n, a(n) for n = 1..100197

K. S. Brown, On General Palindromic Numbers

C. K. Caldwell, "Top Twenty" page, Palindrome

P. De Geest, World!Of Palindromic Primes

I. Peterson, Math Trek, Palindromic Primes

M. Shafer, First 401066 Palprimes [Broken link]

Eric Weisstein's World of Mathematics, Palindromic Number

Eric Weisstein's World of Mathematics, Palindromic Prime

Eric Weisstein's World of Mathematics, Integer Sequence Primes

Wikipedia, Palindromic prime

Index entries for sequences related to palindromes

FORMULA

Intersection of A000040 (primes) and A002113 (palindromes).

A010051(a(n)) * A136522(a(n)) = 1.  [Reinhard Zumkeller, Apr 11 2011]

MAPLE

ff := proc(n) local i, j, k, s, aa, nn, bb, flag; s := n; aa := convert(s, string); nn := length(aa); bb := ``; for i from nn by -1 to 1 do bb := cat(bb, substring(aa, i..i)); od; flag := 0; for j from 1 to nn do if substring(aa, j..j)<>substring(bb, j..j) then flag := 1 fi; od; RETURN(flag); end; gg := proc(i) if ff(ithprime(i)) = 0 then RETURN(ithprime(i)) fi end;

rev:=proc(n) local nn, nnn: nn:=convert(n, base, 10): add(nn[nops(nn)+1-j]*10^(j-1), j=1..nops(nn)) end: a:=proc(n) if n=rev(n) and isprime(n)=true then n else fi end: seq(a(n), n=1..20000); # rev is a Maple program to revert a number - Emeric Deutsch, Mar 25 2007

MATHEMATICA

Select[ Prime[ Range[2100] ], IntegerDigits[#] == Reverse[ IntegerDigits[#] ] & ]

lst = {}; e = 3; Do[p = n*10^(IntegerLength[n] - 1) + FromDigits@Rest@Reverse@IntegerDigits[n]; If[PrimeQ[p], AppendTo[lst, p]], {n, 10^e - 1}]; Insert[lst, 11, 5] (* Arkadiusz Wesolowski, May 04 2012 *)

PROG

(Haskell)

a002385 n = a002385_list !! (n-1)

a002385_list = filter ((== 1) . a136522) a000040_list

-- Reinhard Zumkeller, Apr 11 2011

(PARI) is(n)=n==eval(concat(Vecrev(Str(n))))&&isprime(n) \\ Charles R Greathouse IV, Nov 20 2012

CROSSREFS

A007500 = this sequence union A006567.

Cf. A016041, A029732, A117697.

Sequence in context: A077652 * A069217 A083139 A088562 A083712 A082806

Adjacent sequences:  A002382 A002383 A002384 * A002386 A002387 A002388

KEYWORD

nonn,base,nice,easy

AUTHOR

N. J. A. Sloane, Simon Plouffe

EXTENSIONS

More terms from Larry Reeves (larryr(AT)acm.org), Oct 25 2000

Comment from A006093 moved here by Franklin T. Adams-Watters, Dec 03 2009

Mentioned the sequence A006093 in my comment, previously omitted by mistake Lekraj Beedassy, Dec 06 2009

STATUS

approved

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

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

Last modified May 18 15:48 EDT 2013. Contains 225422 sequences.