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”).

A346022
Primes that are the first in a run of exactly 2 emirps.
8
13, 31, 337, 701, 761, 937, 983, 1151, 1279, 1831, 1933, 3191, 3803, 3851, 3911, 7043, 7219, 7457, 7523, 7643, 9127, 9161, 9241, 9437, 9521, 9547, 9601, 9871, 9931, 10007, 10151, 10247, 10487, 10639, 10853, 10889, 11071, 11657, 11833, 12071, 12547, 12689
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(2) = 31 because of the four consecutive primes 29, 31, 37, 41 only 31, 37 are emirps.
PROG
(Python)
from sympy import isprime, nextprime
def isemirp(p): s = str(p); return s != s[::-1] and isprime(int(s[::-1]))
def aupto(limit):
alst, pvec, evec, p = [], [2, 3, 5, 7], [0, 0, 0, 0], 11
while pvec[1] <= limit:
if evec == [0, 1, 1, 0]: alst.append(pvec[1])
pvec = pvec[1:] + [p]; evec = evec[1:] + [isemirp(p)]; p = nextprime(p)
return alst
print(aupto(12689)) # Michael S. Branicky, Jul 04 2021
CROSSREFS
Subsequence of A006567 (emirps).
Sequence in context: A299888 A023304 A247837 * A227172 A180757 A214488
KEYWORD
nonn,base
AUTHOR
Lars Blomberg, Jul 01 2021
STATUS
approved