This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A348167 #23 Oct 04 2021 18:15:25 %S A348167 1,2,5,9,10,18,21,37,41,42,73,74,82,85,146,149,165,169,170,293,297, %T A348167 298,329,330,338,341,585,586,594,597,658,661,677,681,682,1170,1173, %U A348167 1189,1193,1194,1317,1321,1322,1353,1354,1362,1365,2341,2345,2346,2377,2378 %N A348167 Numbers whose binary representation contains a maximal set of nonconsecutive 1's. %C A348167 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. %e A348167 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. %e A348167 4 is not in the sequence, because its binary representation 100 can be augmented to 101, producing another number in the sequence. %o A348167 (Python) %o A348167 def A348167(): %o A348167 x = -1 %o A348167 while True: %o A348167 x = x + 1 %o A348167 if x & (x>>1): continue %o A348167 if (x & 3) == 0: continue %o A348167 negx = ~x %o A348167 gaps = negx & (negx >> 1) & (negx >> 2) %o A348167 if (gaps-1) & x != x: continue %o A348167 yield x %Y A348167 Subsequence of A003714 and A086638. %K A348167 nonn,base %O A348167 1,2 %A A348167 _David Eppstein_, Oct 03 2021