OFFSET
1,1
COMMENTS
There are large gaps in this sequence because all terms need to begin with 1, 3, 7, or 9 otherwise the reversal is composite.
EXAMPLE
a(1) = 71 because of the five consecutive primes 67, 71, 73, 79, 83 all except 67 and 83 are emirps and this is the first such occurrence.
MATHEMATICA
Select[Prime@Range@10000, Boole[PrimeQ@#&&!PalindromeQ@#&/@(IntegerReverse/@NextPrime[#, Range[-1, 3]])]=={0, 1, 1, 1, 0}&] (* Giorgos Kalogeropoulos, Jul 04 2021 *)
PROG
(Python)
from sympy import isprime, primerange
def isemirp(p): s = str(p); return s != s[::-1] and isprime(int(s[::-1]))
def aupto(limit):
alst, pvec, evec = [], [2, 3, 5, 7, 11], [0, 0, 0, 0, 0]
for p in primerange(13, limit+1):
if evec == [0, 1, 1, 1, 0]: alst.append(pvec[1])
pvec = pvec[1:] + [p]; evec = evec[1:] + [isemirp(p)]
return alst
print(aupto(20000)) # Michael S. Branicky, Jul 04 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Lars Blomberg, Jul 02 2021
STATUS
approved
