cp's OEIS Frontend

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.

A346023 Primes that are the first in a run of exactly 3 emirps.

This page as a plain text file.
%I A346023 #12 Jul 04 2021 16:02:07
%S A346023 71,953,1021,1097,1381,1499,1583,1723,3011,3083,3271,3343,3463,7673,
%T A346023 7949,9209,9479,10453,10987,11149,12289,12743,13499,13751,14057,14087,
%U A346023 14549,15289,15649,15731,16103,16193,16567,17033,17203,17669,17737,17903,18899,19793
%N A346023 Primes that are the first in a run of exactly 3 emirps.
%C A346023 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 A346023 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.
%t A346023 Select[Prime@Range@10000,Boole[PrimeQ@#&&!PalindromeQ@#&/@(IntegerReverse/@NextPrime[#,Range[-1,3]])]=={0,1,1,1,0}&] (* _Giorgos Kalogeropoulos_, Jul 04 2021 *)
%o A346023 (Python)
%o A346023 from sympy import isprime, primerange
%o A346023 def isemirp(p): s = str(p); return s != s[::-1] and isprime(int(s[::-1]))
%o A346023 def aupto(limit):
%o A346023     alst, pvec, evec = [], [2, 3, 5, 7, 11], [0, 0, 0, 0, 0]
%o A346023     for p in primerange(13, limit+1):
%o A346023         if evec == [0, 1, 1, 1, 0]: alst.append(pvec[1])
%o A346023         pvec = pvec[1:] + [p]; evec = evec[1:] + [isemirp(p)]
%o A346023     return alst
%o A346023 print(aupto(20000)) # _Michael S. Branicky_, Jul 04 2021
%Y A346023 Subsequence of A006567 (emirps)
%Y A346023 Cf. A003684, A048052, A048054, A071612, A346022, A346024, A346025.
%K A346023 nonn,base
%O A346023 1,1
%A A346023 _Lars Blomberg_, Jul 02 2021