login
A353718
Lengths of runs of identical terms in A353710.
3
1, 1, 1, 3, 8, 40, 3, 20, 10, 4, 95, 60, 77, 227, 498, 162, 438, 988, 334, 946, 1342, 13633, 1446, 810, 103, 140, 7033, 2518, 2369, 5096, 1719, 300, 2397, 14590, 434, 6539, 26193, 20403, 13857, 10, 26972, 24908, 44745, 3346, 149938, 5859, 29919, 132184, 123679
OFFSET
1,4
LINKS
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
A353718_list = list(islice(A353718_gen(), 20)) # Chai Wah Wu, May 10 2022
CROSSREFS
Sequence in context: A108262 A034892 A072687 * A260817 A262126 A110561
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, May 09 2022
EXTENSIONS
More terms from Rémy Sigrist, May 09 2022
STATUS
approved