|
| |
|
|
A069010
|
|
Number of runs of 1's in binary representation of n.
|
|
7
| |
|
|
0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 2, 3, 3, 3, 2, 3, 2, 2, 1, 2, 2, 2, 2, 3, 2, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 2, 3, 3, 3, 2, 3, 2, 2, 2, 3, 3, 3, 3, 4, 3, 3, 2, 3, 3, 3, 2, 3
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,6
|
|
|
LINKS
| R. Stephan, Some divide-and-conquer sequences ...
R. Stephan, Table of generating functions
|
|
|
FORMULA
| a(n) =ceiling[A005811(n)/2] =A005811(n)-A033264(n). If 2^k<=n<3*2^(k-1) then a(n)=a(n-2^k)+1; if 3*2^(k-1)<=n<2^(k+1) then a(n)=a(n-2^k).
a(2n) = a(n), a(2n+1) = a(n) + [n is even]. - Ralf Stephan (ralf(AT)ark.in-berlin.de), Aug 20 2003
G.f.: 1/(1-x) * sum(k>=0, t/(1+t)/(1+t^2), t=x^2^k). - Ralf Stephan (ralf(AT)ark.in-berlin.de), Sep 07 2003
a(n) = A000120(n) - A014081(n) = A037800(n) + 1, n>0. - Ralf Stephan (ralf(AT)ark.in-berlin.de), Sep 10 2003
|
|
|
EXAMPLE
| a(11)=2 since 11 is 1011 in binary with two runs of 1's. a(12)=1 since 12 is 1100 in binary with one run of 1's.
|
|
|
CROSSREFS
| Sequence in context: A029364 A122586 A079487 * A087048 A109700 A087742
Adjacent sequences: A069007 A069008 A069009 * A069011 A069012 A069013
|
|
|
KEYWORD
| base,easy,nonn
|
|
|
AUTHOR
| Henry Bottomley (se16(AT)btinternet.com), Apr 02 2002
|
| |
|
|