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.

A352312 Start of the first run of exactly n consecutive primes using only prime digits.

This page as a plain text file.
%I A352312 #14 Mar 15 2022 14:42:03
%S A352312 7,223,37253,2,2575723,7533777323,277535577223,5323733533375237,
%T A352312 57552737757357223
%N A352312 Start of the first run of exactly n consecutive primes using only prime digits.
%C A352312 This is a variant of A343471.
%H A352312 Chris K. Caldwell and G. L. Honaker, Jr., <a href="https://primes.utm.edu/curios/page.php?curio_id=41445">Prime Curios! 277535577223</a>.
%e A352312 a(1) = 7 because it is the first prime using only prime digits and whose next prime 11 does not use only prime digits.
%e A352312 a(3) = 37253 because 37253, 37273, 37277 is the first run of 3 consecutive primes using only prime digits, then next prime 37307 has a digit 0.
%o A352312 (Python)
%o A352312 from sympy import nextprime, isprime
%o A352312 from itertools import count, islice, product
%o A352312 def onlypd(n): return set(str(n)) <= set("2357")
%o A352312 def agen():
%o A352312     adict, n = {1:7, 4:2}, 1
%o A352312     yield 7
%o A352312     for digits in count(2):
%o A352312         for p in product("2357", repeat=digits-1):
%o A352312             for end in "37":
%o A352312                 t0 = t = int("".join(p) + end)
%o A352312                 run = 0
%o A352312                 while isprime(t):
%o A352312                     run += 1
%o A352312                     t = nextprime(t)
%o A352312                     if not onlypd(t): break
%o A352312                 if run not in adict:
%o A352312                     adict[run] = t0
%o A352312                     if run > n:
%o A352312                         for r in range(n+1, run+1):
%o A352312                             if r in adict:
%o A352312                                 yield adict[r]
%o A352312                                 n += 1
%o A352312 print(list(islice(agen(), 6))) # _Michael S. Branicky_, Mar 11 2022
%Y A352312 Cf. A082755, A343471.
%Y A352312 Subsequence of A019546.
%K A352312 nonn,base,more
%O A352312 1,1
%A A352312 _Bernard Schott_, Mar 11 2022
%E A352312 a(9) from _Michael S. Branicky_, Mar 15 2022