OFFSET
0,2
COMMENTS
See A358402 for further details.
PROG
(Python)
from itertools import count, islice
def agen():
k, an, first, prev = 0, 0, {0: 1}, {0: 1}
for n in count(2):
while k in first: yield first[k]; k += 1
an1 = 0 if first[an] == n-1 else min(n-1-prev[an], first[an])
if an1 not in first: first[an1] = prev[an1] = n
prev[an] = n-1
an = an1
print(list(islice(agen(), 62))) # Michael S. Branicky, Nov 14 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Nov 14 2022
STATUS
approved