OFFSET
1,2
PROG
(Python 3.10+)
# if Python version < 3.10, replace i.bit_count() with bin(i).count('1')
from itertools import islice
def A352202_gen(): # generator of terms
yield 1
l1, s, b = 1, 2, set()
while True:
i = s
while True:
if i & l1 and not i in b:
yield i.bit_count()
l1 = i
b.add(i)
while s in b:
b.remove(s)
s += 1
break
i += 1
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Mar 27 2022
STATUS
approved