This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A216685 A(n) is the number of 1's in binary expansion of n + a(n-1), with a(0)=0. 0
 0, 1, 2, 2, 2, 3, 2, 2, 2, 3, 3, 3, 4, 2, 1, 1, 2, 3, 3, 3, 4, 3, 3, 3, 4, 4, 4, 5, 2, 5, 3, 2, 2, 3, 3, 3, 4, 3, 3, 3, 4, 4, 4, 5, 3, 2, 2, 3, 4, 4, 4, 5, 4, 4, 4, 5, 5, 5, 6, 2, 5, 2, 1, 1, 2, 3, 3, 3, 4, 3, 3, 3, 4, 4, 4, 5, 3, 2, 2, 3, 4, 4, 4, 5, 4, 4, 4 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Indices of 1's: 1, 14, 15, 62, 63, 254, 255, 2045, 4087, 32766, 32767, 65523, 131069, 262129, 524272, 524286, 524287, 2097149, 8388605, 16777195, 16777212, ... LINKS FORMULA a(0) = 0, a(n) = A000120(n+a(n-1)). PROG (Python) a=0 for n in range(1, 333):     print a,     x = a+n     a = 0     while x:         a += x & 1         x >>= 1 CROSSREFS Cf. A000120. Sequence in context: A127656 A109709 A125604 * A187184 A301375 A325273 Adjacent sequences:  A216682 A216683 A216684 * A216686 A216687 A216688 KEYWORD nonn,base AUTHOR Alex Ratushnyak, Sep 14 2012 STATUS approved

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

Last modified April 19 02:51 EDT 2019. Contains 322237 sequences. (Running on oeis4.)