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!)
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. 10
0, 2, 4, 8, 10, 12, 16, 18, 20, 24, 32, 34, 36, 40, 42, 44, 48, 50, 52, 56, 64, 66, 68, 72, 74, 76, 80, 82, 84, 88, 96, 98, 100, 104, 112, 128, 130, 132, 136, 138, 140, 144, 146, 148, 152, 160, 162, 164, 168, 170, 172, 176, 178, 180, 184, 192, 194, 196, 200, 202, 204 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A036989(a(n)) = 1. - Reinhard Zumkeller, Jul 31 2013
LINKS
H. Niederreiter and M. Vielhaber, Tree complexity and a doubly exponential gap between structured and random sequences, J. Complexity, 12 (1996), 187-198.
FORMULA
MATHEMATICA
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 *)
(* 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 *)
PROG
(Haskell)
a036990 n = a036990_list !! (n-1)
a036990_list = filter ((== 1) . a036989) [0..]
-- Reinhard Zumkeller, Jul 31 2013
CROSSREFS
Each term is 2^n * some term of A014486 (n >= 0).
Cf. A030308.
Sequence in context: A047464 A189786 A195066 * A097498 A346502 A321580
KEYWORD
nonn,easy,base
AUTHOR
EXTENSIONS
More terms from Erich Friedman.
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 16 02:41 EDT 2024. Contains 371696 sequences. (Running on oeis4.)