login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A348167 Numbers whose binary representation contains a maximal set of nonconsecutive 1's. 1
1, 2, 5, 9, 10, 18, 21, 37, 41, 42, 73, 74, 82, 85, 146, 149, 165, 169, 170, 293, 297, 298, 329, 330, 338, 341, 585, 586, 594, 597, 658, 661, 677, 681, 682, 1170, 1173, 1189, 1193, 1194, 1317, 1321, 1322, 1353, 1354, 1362, 1365, 2341, 2345, 2346, 2377, 2378 (list; graph; refs; listen; history; text; internal format)
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.
LINKS
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
Subsequence of A003714 and A086638.
Sequence in context: A095347 A249353 A224866 * A159073 A088343 A110781
KEYWORD
nonn,base
AUTHOR
David Eppstein, Oct 03 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)