OFFSET
1,1
COMMENTS
Original idea from G. L. Honaker, Jr..
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
EXAMPLE
E.g., prime 113 has emirp 311 and 11311 is a palindromic prime, so 113 is a term.
MATHEMATICA
empQ[n_]:=Module[{idn=IntegerDigits[n], rev}, rev=Reverse[idn]; And@@PrimeQ[ {FromDigits[ rev], FromDigits[Join[Most[idn], rev]]}]]; Select[Prime[ Range[ 1200]], empQ] (* Harvey P. Dale, Mar 26 2013 *)
PROG
(Python)
from sympy import isprime
def ok(n):
if not isprime(n): return False
s = str(n); srev = s[::-1]
return isprime(int(srev)) and isprime(int(s[:-1] + srev))
print([k for k in range(10**4) if ok(k)]) # Michael S. Branicky, Nov 17 2023
CROSSREFS
KEYWORD
nonn,base,nice
AUTHOR
Patrick De Geest, Feb 15 2000
EXTENSIONS
Corrected (a(30)=3089 inserted) by Harvey P. Dale, Mar 26 2013
STATUS
approved