A037033
Earliest sequence of 6 primes according to the rules stipulated in A005150.
Original entry on oeis.org
233, 1223, 112213, 21221113, 1211223113, 11122122132113
Offset: 0
A038132
Third earliest sequence of 6 primes according to the rules stipulated in A005150.
Original entry on oeis.org
402266411, 141022261421, 11141110321611141211, 31143110131211163114111221, 132114132110111311123116132114312211, 1113122114111312211031133112132116111312211413112221
Offset: 1
A334726
a(k) is the earliest start of sequence of exactly k primes generated according to the rules stipulated in A005150.
Original entry on oeis.org
1, 2, 3, 7, 373, 1223, 233, 19972667609, 75022592087629
Offset: 0
The sequence starting at 7 is 7 (prime), 17 (prime), 1117 (prime), and 3117 (composite), so a(3) = 7.
-
from sympy import isprime, nextprime
from itertools import count, groupby, islice
def LS(n):
return int(''.join(str(len(list(g)))+k for k, g in groupby(str(n))))
def f(n): return 0 if not isprime(n) else 1 + f(LS(n))
def agen(startn=0, startk=1):
n, adict = startn, {i:-1 for i in range(startn)}
for k in count(startk):
fk = f(k)
if fk not in adict: adict[fk] = k
while n in adict: yield adict[n]; n += 1
print(list(islice(agen(), 7))) # Michael S. Branicky, Jul 27 2022
Showing 1-3 of 3 results.