This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A346021 #9 Aug 08 2021 11:33:43 %S A346021 97,107,113,149,157,167,179,199,311,359,389,907,1009,1061,1069,1091, %T A346021 1181,1301,1321,1429,1439,1453,1471,1487,1559,1619,1657,1669,1753, %U A346021 1789,1811,1867,1879,1901,1913,1979,3049,3067,3121,3163,3169,3221,3251,3257,3319 %N A346021 Primes that are the first in a run of exactly 1 emirp. %C A346021 There are large gaps in this sequence because all terms need to begin with 1, 3, 7, or 9 otherwise the reversal is composite. %e A346021 a(1) = 97 because of the three consecutive primes 89, 97, 101 only 97 is an emirp and this is the first such occurrence. %t A346021 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 *) %o A346021 (Python) %o A346021 from sympy import isprime, nextprime %o A346021 def isemirp(p): s = str(p); return s != s[::-1] and isprime(int(s[::-1])) %o A346021 def aupto(limit): %o A346021 alst, pvec, evec, p = [], [2, 3, 5], [0, 0, 0], 7 %o A346021 while pvec[1] <= limit: %o A346021 if evec == [0, 1, 0]: alst.append(pvec[1]) %o A346021 pvec = pvec[1:] + [p]; evec = evec[1:] + [isemirp(p)]; p = nextprime(p) %o A346021 return alst %o A346021 print(aupto(3319)) # _Michael S. Branicky_, Jul 14 2021 %Y A346021 Subsequence of A006567 (emirps). %Y A346021 Cf. A003684, A048052, A048054, A071612, A346022, A346023, A346024, A346025, A346026, A346027, A346028, A346029. %K A346021 nonn,base %O A346021 1,1 %A A346021 _Lars Blomberg_, Jul 14 2021