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.

A334726 a(k) is the earliest start of sequence of exactly k primes generated according to the rules stipulated in A005150.

This page as a plain text file.
%I A334726 #16 Jul 27 2022 03:49:34
%S A334726 1,2,3,7,373,1223,233,19972667609,75022592087629
%N A334726 a(k) is the earliest start of sequence of exactly k primes generated according to the rules stipulated in A005150.
%H A334726 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_036.htm">Puzzle 36. Sequences of "descriptive primes"</a>, The Prime Puzzles and Problems Connection.
%H A334726 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_999.htm">Puzzle 999. In Memoriam to John Horton Conway</a>, The Prime Puzzles and Problems Connection.
%e A334726 The sequence starting at 7 is 7 (prime), 17 (prime), 1117 (prime), and 3117 (composite), so a(3) = 7.
%o A334726 (Python)
%o A334726 from sympy import isprime, nextprime
%o A334726 from itertools import count, groupby, islice
%o A334726 def LS(n):
%o A334726     return int(''.join(str(len(list(g)))+k for k, g in groupby(str(n))))
%o A334726 def f(n): return 0 if not isprime(n) else 1 + f(LS(n))
%o A334726 def agen(startn=0, startk=1):
%o A334726     n, adict = startn, {i:-1 for i in range(startn)}
%o A334726     for k in count(startk):
%o A334726         fk = f(k)
%o A334726         if fk not in adict: adict[fk] = k
%o A334726         while n in adict: yield adict[n]; n += 1
%o A334726 print(list(islice(agen(), 7))) # _Michael S. Branicky_, Jul 27 2022
%Y A334726 Cf. A005150, A079637, A037033, A038131, A038132.
%K A334726 nonn,base,more,hard
%O A334726 0,2
%A A334726 _Giovanni Resta_, May 09 2020