OFFSET
1,3
LINKS
PROG
(PARI)
v109812 = readvec("b109812_to10e5.txt"); \\ Prepared from b-file data with gawk ' { print $2 } '
up_to = #v109812;
A109812(n) = v109812[n];
A007814(n) = valuation(n, 2);
(Python)
from itertools import count, islice
def A351964_gen(): # generator of terms
yield 0
l1, s, b = 1, 2, set()
while True:
for i in count(s):
if not (i in b or i & l1):
yield (~i&i-1).bit_length()
l1 = i
b.add(i)
while s in b:
b.remove(s)
s += 1
break
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Apr 07 2022
STATUS
approved