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 A036990 #25 Jul 08 2025 21:58:45 %S A036990 0,2,4,8,10,12,16,18,20,24,32,34,36,40,42,44,48,50,52,56,64,66,68,72, %T A036990 74,76,80,82,84,88,96,98,100,104,112,128,130,132,136,138,140,144,146, %U A036990 148,152,160,162,164,168,170,172,176,178,180,184,192,194,196,200,202,204 %N A036990 Numbers n such that, in the binary expansion of n, reading from right to left, the number of 1's never exceeds the number of 0's. %C A036990 A036989(a(n)) = 1. - _Reinhard Zumkeller_, Jul 31 2013 %H A036990 Reinhard Zumkeller, <a href="/A036990/b036990.txt">Table of n, a(n) for n = 1..10000</a> %H A036990 H. Niederreiter and M. Vielhaber, <a href="http://dx.doi.org/10.1006/jcom.1996.0014">Tree complexity and a doubly exponential gap between structured and random sequences</a>, J. Complexity, 12 (1996), 187-198. %F A036990 a(n) = 2*A095775(n). - _Robert G. Wilson v_ %t A036990 fQ[n_] := Block[{od = ev = k = 0, id = Reverse@IntegerDigits[n, 2], lmt = Floor@Log[2, n] + 1}, While[k < lmt && od < ev + 1, If[OddQ@id[[k + 1]], od++, ev++ ]; k++ ]; If[k == lmt && od < ev + 1, True, False]]; Select[ Range[0, 204, 2], fQ@# &] (* _Robert G. Wilson v_, Jan 11 2007 *) %t A036990 (* b = A036989 *) b[0] = 1; b[n_?EvenQ] := b[n] = Max[b[n/2]-1, 1]; b[n_] := b[n] = b[(n-1)/2]+1; Select[Range[0, 300, 2], b[#] == 1 &] (* _Jean-François Alcover_, Nov 05 2013, after _Reinhard Zumkeller_ *) %o A036990 (Haskell) %o A036990 a036990 n = a036990_list !! (n-1) %o A036990 a036990_list = filter ((== 1) . a036989) [0..] %o A036990 -- _Reinhard Zumkeller_, Jul 31 2013 %Y A036990 Cf. A036988, A036991, A036992, A061854, A125086. %Y A036990 Each term is 2^n * some term of A014486 (n >= 0). %Y A036990 Cf. A030308. %K A036990 nonn,easy,base %O A036990 1,2 %A A036990 _N. J. A. Sloane_ %E A036990 More terms from _Erich Friedman_.