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.

A346025 Primes that are the first in a run of exactly 5 emirps.

This page as a plain text file.
%I A346025 #11 Jul 04 2021 16:02:25
%S A346025 3371,9769,11699,11953,15493,34549,72307,72547,105653,106391,109849,
%T A346025 129587,139387,144407,169067,170759,178333,193261,193877,316073,
%U A346025 324031,324893,325163,333923,339671,375787,381859,389287,701383,701593,712289,722633,744377,777349
%N A346025 Primes that are the first in a run of exactly 5 emirps.
%C A346025 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 A346025 a(1) = 3371 because of the seven consecutive primes 3361, 3371, 3373, 3389, 3391, 3407, 3413 all except 3361 and 3413 are emirps and this is the first such occurrence.
%t A346025 Select[Prime@Range@20000,Boole[PrimeQ@#&&!PalindromeQ@#&/@(IntegerReverse/@NextPrime[#,Range[-1,5]])]=={0,1,1,1,1,1,0}&] (* _Giorgos Kalogeropoulos_, Jul 04 2021 *)
%o A346025 (Python)
%o A346025 from sympy import isprime, primerange
%o A346025 def isemirp(p): s = str(p); return s != s[::-1] and isprime(int(s[::-1]))
%o A346025 def aupto(limit):
%o A346025     alst, pvec, evec = [], [2, 3, 5, 7, 11, 13, 17], [0, 0, 0, 0, 0, 0, 0]
%o A346025     for p in primerange(19, limit+1):
%o A346025         if evec == [0, 1, 1, 1, 1, 1, 0]: alst.append(pvec[1])
%o A346025         pvec = pvec[1:] + [p]; evec = evec[1:] + [isemirp(p)]
%o A346025     return alst
%o A346025 print(aupto(780000)) # _Michael S. Branicky_, Jul 04 2021
%Y A346025 Subsequence of A006567 (emirps).
%Y A346025 Cf. A003684, A048052, A048054, A071612, A346022, A346023, A346024.
%K A346025 nonn,base
%O A346025 1,1
%A A346025 _Lars Blomberg_, Jul 02 2021