OFFSET
1,4
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..132
Rémy Sigrist, C++ program
EXAMPLE
The first 60 terms of A353710 are 0, / 1, / 2, / 3, 3, 3, / 5, 5, 5, 5, 5, 5, 5, 5, / 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, / 11, 11, 11, / 15, 15, 15, ... The slashes indicate the initial runs of lengths 1, 1, 1, 3, 8, 40, 3, ...
PROG
(C++) See Links section.
(Python)
from itertools import count, islice
def A353718_gen(): # generator of terms
s, a, b, c, ab, k = {0, 1}, 0, 1, 2, 1, 1
yield from (1, 1)
while True:
for n in count(c):
if not (n & ab or n in s):
a, b = b, n
ab = a|b
s.add(n)
if c in s:
yield k
k = 0
while c in s:
c += 1
k += 1
break
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, May 09 2022
EXTENSIONS
More terms from Rémy Sigrist, May 09 2022
STATUS
approved