OFFSET
1,3
COMMENTS
Length of the runs of 0s and 1s in A362240.
LINKS
Neal Gersh Tolunsky, Table of n, a(n) for n = 1..10000
PROG
(Python)
from itertools import chain, count, groupby, islice, product
def bins(): yield from ("".join(b) for d in count(1) for b in product("01", repeat=d))
def bgen(s=""): yield from chain.from_iterable(map(int, t) for t in bins() if t not in s and (s:=s+t))
def agen(): yield from (len(list(g)) for k, g in groupby(bgen()))
print(list(islice(agen(), 89))) # Michael S. Branicky, May 02 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, May 02 2023
STATUS
approved