The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A029971 Palindromic primes in base 3. 12
 2, 13, 23, 151, 173, 233, 757, 937, 1093, 1249, 1429, 1487, 1667, 1733, 1823, 1913, 1979, 2069, 8389, 9103, 10111, 12301, 14951, 16673, 16871, 18593, 60103, 60913, 61507, 63127, 69697, 73243, 78979, 80599, 82003, 82813, 83407, 85027 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Intersection of A000040 and A014190. - Michel Marcus, Aug 19 2015 LINKS Chai Wah Wu, Table of n, a(n) for n = 1..3004 P. De Geest, World!Of Palindromic Primes MAPLE N:= 14: # to get all terms < 3^N Res:= 2: digrev:=proc(n) local L; L:= convert(n, base, 3); add(L[-i]*3^(i-1), i=1..nops(L)) end proc; for d from 2 to N do if d::even then m:= d/2; Res:= Res, op(select(isprime, [seq](n*3^m + digrev(n), n=3^(m-1)..3^m-1))); else m:= (d-1)/2; Res:= Res, op(select(isprime, [seq](seq(n*3^(m+1)+y*3^m+digrev(n), y=0..2), n=3^(m-1)..3^m-1))); fi od: Res; # Robert Israel, Aug 19 2015 MATHEMATICA Do[s = RealDigits[n, 3][[1]]; If[PrimeQ[n], If[FromDigits[s] == FromDigits[Reverse[s]], Print[n]]], {n, 1, 8500}] Select[Prime[Range[8300]], Reverse[x = IntegerDigits[#, 3]] == x &] (* Jayanta Basu, Jun 23 2013 *) PROG (PARI) lista(nn) = forprime(p=2, nn, if ((d=digits(p, 3)) && (Vecrev(d)==d), print1(p, ", "))); \\ Michel Marcus, Aug 19 2015 CROSSREFS Cf. A117698 (in base 3), A014190. Sequence in context: A093301 A079397 A118524 * A243619 A243620 A090526 Adjacent sequences: A029968 A029969 A029970 * A029972 A029973 A029974 KEYWORD nonn,base AUTHOR Patrick De Geest 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.

Last modified February 28 14:20 EST 2024. Contains 370400 sequences. (Running on oeis4.)