[go: up one dir, main page]

login
A036993
Numbers n with property that reading from right to left in the binary expansion of n, the number of 0's always stays ahead of the number of 1's.
3
0, 4, 8, 16, 20, 24, 32, 36, 40, 48, 64, 68, 72, 80, 84, 88, 96, 100, 104, 112, 128, 132, 136, 144, 148, 152, 160, 164, 168, 176, 192, 196, 200, 208, 224, 256, 260, 264, 272, 276, 280, 288, 292, 296, 304, 320, 324, 328, 336, 340, 344, 352, 356, 360, 368, 384
OFFSET
1,2
MATHEMATICA
Select[Range[0, 400], Min[Accumulate[Reverse[IntegerDigits[#, 2]]/.{0->1, 1->-1}]]>0&] (* Harvey P. Dale, Aug 25 2013 *)
PROG
(Haskell)
a036993 n = a036993_list !! (n-1)
a036993_list = filter ((p 0) . a030308_row) [0..] where
p _ [] = True
p zeros (0:bs) = p (zeros + 1) bs
p zeros (1:bs) = zeros > 1 && p (zeros - 1) bs
-- Reinhard Zumkeller, Jul 31 2013
CROSSREFS
KEYWORD
nonn,easy,base,nice
EXTENSIONS
More terms from Erich Friedman
STATUS
approved