login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A045336
Palindromic terms from A019546.
6
2, 3, 5, 7, 353, 373, 727, 757, 32323, 33533, 35353, 35753, 37273, 37573, 72227, 72727, 73237, 75557, 77377, 3222223, 3223223, 3233323, 3252523, 3272723, 3337333, 3353533, 3553553, 3722273, 3732373, 3773773, 7257527, 7327237, 7352537, 7527257, 7722277
OFFSET
1,1
COMMENTS
a(33) = 7352537 is the smallest palindromic prime using all prime digits (see Prime Curios! link). - Bernard Schott, Nov 10 2020
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..12725 (all terms with <= 17 digits; terms 1..330 from Harvey P. Dale)
Chris K. Caldwell and G. L. Honaker, Jr., 7352537, Prime Curios!
MATHEMATICA
Select[ Range[ 1, 10^7 ], PrimeQ[ # ] && FreeQ[ RealDigits[ # ][ [ 1 ] ], 0 ] && FreeQ[ RealDigits[ # ][ [ 1 ] ], 1 ] && FreeQ[ RealDigits[ # ][ [ 1 ] ], 4 ] && FreeQ[ RealDigits[ # ][ [ 1 ] ], 6 ] && FreeQ[ RealDigits[ # ][ [ 1 ] ], 8 ] && FreeQ[ RealDigits[ # ][ [ 1 ] ], 9 ] && RealDigits[ # ][ [ 1 ] ] == Reverse[ RealDigits[ # ][ [ 1 ] ] ] & ]
Table[FromDigits/@Select[Tuples[{2, 3, 5, 7}, n], #==Reverse[#]&&PrimeQ[ FromDigits[ #]]&], {n, 12}]//Flatten (* Harvey P. Dale, Jun 19 2016 *)
f@n_ := Prime@n;
g@l_ := FromDigits@# & /@ Table[Join[l, {f@i}, Reverse@l], {i, 4}];
Flatten[g@# & /@ (f@# & /@
Select[Table[IntegerDigits[n, 5], {n, 2000}], FreeQ[#, 0] &])] //
Select[PrimeQ] (* Hans Rudolf Widmer, Dec 18 2021 *)
PROG
(Python)
from sympy import isprime
from itertools import count, product, takewhile
def primedigpals():
for d in count(1, 2):
for p in product("2357", repeat=d//2):
left = "".join(p)
for mid in "2357":
yield int(left + mid + left[::-1])
def aupto(N):
return list(takewhile(lambda x: x<=N, filter(isprime, primedigpals())))
print(aupto(10**7)) # Michael S. Branicky, Dec 18 2021
CROSSREFS
Cf. A019546 and A002385.
Sequence in context: A052023 A052025 A359491 * A083183 A046477 A360789
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Aug 18 2000
STATUS
approved