login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A346021 Primes that are the first in a run of exactly 1 emirp. 0
97, 107, 113, 149, 157, 167, 179, 199, 311, 359, 389, 907, 1009, 1061, 1069, 1091, 1181, 1301, 1321, 1429, 1439, 1453, 1471, 1487, 1559, 1619, 1657, 1669, 1753, 1789, 1811, 1867, 1879, 1901, 1913, 1979, 3049, 3067, 3121, 3163, 3169, 3221, 3251, 3257, 3319 (list; graph; refs; listen; history; text; internal format)
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.
LINKS
EXAMPLE
a(1) = 97 because of the three consecutive primes 89, 97, 101 only 97 is an emirp and this is the first such occurrence.
MATHEMATICA
emirpQ[p_] := (r = IntegerReverse[p]) != p && PrimeQ[r]; p = Select[Range[3400], PrimeQ]; p[[1 + Position[Partition[emirpQ /@ p, 3, 1], {False, True, False}] // Flatten]] (* Amiram Eldar, Jul 14 2021 *)
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], [0, 0, 0], 7
while pvec[1] <= limit:
if evec == [0, 1, 0]: alst.append(pvec[1])
pvec = pvec[1:] + [p]; evec = evec[1:] + [isemirp(p)]; p = nextprime(p)
return alst
print(aupto(3319)) # Michael S. Branicky, Jul 14 2021
CROSSREFS
Subsequence of A006567 (emirps).
Sequence in context: A033208 A274122 A095603 * A232767 A039490 A033202
KEYWORD
nonn,base
AUTHOR
Lars Blomberg, Jul 14 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 1 11:59 EDT 2024. Contains 374817 sequences. (Running on oeis4.)