The OEIS is supported by the many generous donors to the OEIS Foundation.

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A063787 a(2^k) = k + 1 and a(2^k + i) = 1 + a(i) for k >= 0 and 0 < i < 2^k. 21
 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Michael Gilleland, Some Self-Similar Integer Sequences FORMULA a(n) = A000120(n-1) + 1. a(n) = log(A131136)/log(2). - Stephen Crowley, Aug 25 2008 a(n) = A007814(n) + A000120(n). - Gary W. Adamson, Jun 04 2009 a(n) = A000120(A086799(n)). - Reinhard Zumkeller, Jul 31 2010 a(n) = A000120(A047457(n)-1) = A000120(A047457(n)+1). - Ilya Lopatin, Mar 16 2014 EXAMPLE k = 3: a(2^3) = a(8) = 4 = 3 + 1. k = 3, i = 5: a(2^3 + 5) = a(13) = 3 = 1 + 2 = 1 + a(5). From Omar E. Pol, Jun 12 2009: (Start) Triangle begins: 1; 2,2; 3,2,3,3; 4,2,3,3,4,3,4,4; 5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5; 6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6; 7,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,3,4,4,5,... (End) PROG (Python) def a(n): return bin(n-1).count('1') + 1 print([a(n) for n in range(1, 106)]) # Michael S. Branicky, Dec 16 2021 (PARI) a(n) = hammingweight(n-1) + 1; \\ Michel Marcus, Nov 23 2022 CROSSREFS Cf. A000079, A000120, A007814, A086799, A047457, A131136. Cf. A330038 (partial sums). Sequence in context: A211100 A329326 A105264 * A307092 A335458 A335454 Adjacent sequences: A063784 A063785 A063786 * A063788 A063789 A063790 KEYWORD nonn,changed AUTHOR Reinhard Zumkeller, Aug 16 2001 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.

Last modified December 5 14:51 EST 2022. Contains 358588 sequences. (Running on oeis4.)