OFFSET
1,2
COMMENTS
These are the numbers that do not contain 11 and 000 in their binary representations (cf. A086638), and in addition do not have 00 as their two lowest-order bits.
EXAMPLE
5 is in this sequence, because its binary representation 101 cannot have any more ones added (below its highest nonzero bit) while preserving the property of having no two consecutive 1's.
4 is not in the sequence, because its binary representation 100 can be augmented to 101, producing another number in the sequence.
PROG
(Python)
def A348167():
x = -1
while True:
x = x + 1
if x & (x>>1): continue
if (x & 3) == 0: continue
negx = ~x
gaps = negx & (negx >> 1) & (negx >> 2)
if (gaps-1) & x != x: continue
yield x
CROSSREFS
KEYWORD
nonn,base
AUTHOR
David Eppstein, Oct 03 2021
STATUS
approved