login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Smallest missing number when A353709(n) is being calculated.
5

%I #14 May 10 2022 09:54:55

%S 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,

%T 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,15,15,15,

%U 15,15,15,15,15,15,15,15,15,15,15,15,15,15,23,23,23,23,23,23,23,23,23,23,27,27,27,27,29,29,29,29,29,29,29,29,29,29,29,29

%N Smallest missing number when A353709(n) is being calculated.

%H Rémy Sigrist, <a href="/A353710/b353710.txt">Table of n, a(n) for n = 0..16384</a>

%H Rémy Sigrist, <a href="/A353710/a353710.gp.txt">PARI program</a>

%o (PARI) See Links section.

%o (Python)

%o from itertools import count, islice

%o def A353710_gen(): # generator of terms

%o s, a, b, c, ab = {0,1}, 0, 1, 2, 1

%o yield from (0,1)

%o while True:

%o for n in count(c):

%o if not (n & ab or n in s):

%o yield c

%o a, b = b, n

%o ab = a|b

%o s.add(n)

%o while c in s:

%o c += 1

%o break

%o A353710_list = list(islice(A353710_gen(),20)) # _Chai Wah Wu_, May 10 2022

%Y Cf. A084937, A353709.

%K nonn,base

%O 0,3

%A _N. J. A. Sloane_, May 06 2022