login
A029975
Primes that are palindromic in base 7.
7
2, 3, 5, 71, 107, 157, 257, 271, 307, 2549, 2647, 2801, 3347, 3697, 3851, 4201, 4397, 4649, 4951, 5399, 5651, 5749, 5903, 6449, 6701, 7451, 7703, 8053, 8501, 8753, 9103, 9551, 10007, 10357, 10903, 11057, 11953, 12157, 12409, 13109
OFFSET
1,1
MATHEMATICA
f[n_]:=FromDigits[RealDigits[n, 7][[1]]]==FromDigits[Reverse[RealDigits[n, 7][[1]]]]; lst={}; Do[p=Prime[n]; If[f[p], AppendTo[lst, p]], {n, 8!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 10 2009 *)
pb7Q[n_]:=Module[{idn7=IntegerDigits[n, 7]}, idn7==Reverse[idn7]]; Select[ Prime[ Range[1600]], pb7Q] (* Harvey P. Dale, Nov 21 2015 *)
CROSSREFS
Sequence in context: A042239 A270582 A270916 * A042787 A270355 A041131
KEYWORD
nonn,base
STATUS
approved