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.

A343471 Start of the first run of n or more consecutive primes using only prime digits.

This page as a plain text file.
%I A343471 #41 Mar 25 2022 06:27:44
%S A343471 2,2,2,2,2575723,7533777323,277535577223,5323733533375237,
%T A343471 57552737757357223
%N A343471 Start of the first run of n or more consecutive primes using only prime digits.
%C A343471 This is a variant of A352312. - _Bernard Schott_, Mar 24 2022
%H A343471 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 A343471 a(1) = 2 because it is the first prime using only prime digits.
%e A343471 a(2) = 2 because 2, 3 is the first pair of consecutive primes using only prime digits.
%e A343471 a(5) = 2575723 because 2575723, 2575733, 2575753, 2575757, 2575777 is the first run of 5 consecutive primes using only prime digits.
%o A343471 (Python)
%o A343471 from sympy import nextprime, isprime
%o A343471 from itertools import count, islice, product
%o A343471 def onlypd(n): return set(str(n)) <= set("2357")
%o A343471 def agen():
%o A343471     adict = {i:2 for i in range(1, 5)}
%o A343471     for i in range(1, 5): yield 2
%o A343471     for digits in count(2):
%o A343471         for p in product("2357", repeat=digits-1):
%o A343471             for end in "37":
%o A343471                 t0 = t = int("".join(p) + end)
%o A343471                 run = 0
%o A343471                 while isprime(t):
%o A343471                     run += 1
%o A343471                     t = nextprime(t)
%o A343471                     if not onlypd(t): break
%o A343471                 if run not in adict:
%o A343471                     for r in range(max(adict)+1, run+1):
%o A343471                         adict[r] = t0
%o A343471                         yield t0
%o A343471 print(list(islice(agen(), 6))) # _Michael S. Branicky_, Mar 11 2022
%Y A343471 Cf. A019546, A082755, A352312.
%K A343471 nonn,base,hard,more
%O A343471 1,1
%A A343471 _Metin Sariyar_, Apr 16 2021
%E A343471 a(8) from _Daniel Suteu_, Apr 22 2021
%E A343471 a(9) from _Michael S. Branicky_, Mar 15 2022