

A354142


a(n) = smallest number missing from A352808 after A352808(n) has been found.


3



1, 2, 3, 3, 3, 3, 6, 6, 6, 6, 7, 11, 11, 11, 11, 11, 11, 11, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 23, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 30, 30, 30, 30, 30, 30, 31, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


LINKS



EXAMPLE

A352808 (with offset 0) begins 0,1,2,4,5,8; after A352808(0) = 0 has been found, the smallest missing number is 1, so a(0) = 1; after A352808(5) = 8 has been found, the smallest missing number is 3, so a(5) = 3.


PROG

(Python)
from itertools import count, islice
def agen(): # generator of terms
A352808lst, A352808set, mink = [0], {0}, 1
for n in count(1):
yield mink
ahalf, k = A352808lst[n//2], mink
while k in A352808set or k&ahalf: k += 1
A352808lst.append(k); A352808set.add(k)
while mink in A352808set: mink += 1


CROSSREFS



KEYWORD

nonn


AUTHOR



STATUS

approved



