login
A029980
Primes that are palindromic in base 13.
5
2, 3, 5, 7, 11, 313, 353, 379, 431, 457, 523, 601, 653, 719, 797, 823, 863, 941, 967, 1033, 1163, 1229, 1307, 1373, 1399, 1451, 1543, 1621, 1987, 2053, 2131, 30941, 33151, 33827, 34841, 36037, 36713, 37571, 38923, 42667, 44201, 45553, 46411
OFFSET
1,1
MATHEMATICA
f[n_]:=FromDigits[RealDigits[n, 13][[1]]]==FromDigits[Reverse[RealDigits[n, 13][[1]]]]; lst={}; Do[p=Prime[n]; If[f[p], AppendTo[lst, p]], {n, 8!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 10 2009 *)
Select[Prime[Range[5000]], IntegerDigits[#, 13]==Reverse[ IntegerDigits[ #, 13]]&] (* Harvey P. Dale, May 05 2017 *)
PROG
(PARI) isok(n) = if (isprime(n), my(d=digits(n, 13)); d == Vecrev(d)); \\ Michel Marcus, May 16 2017
CROSSREFS
Sequence in context: A046480 A235000 A067906 * A046481 A082625 A030286
KEYWORD
nonn,base
STATUS
approved