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!)
A037800 Number of occurrences of 01 in the binary expansion of n. 14
0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 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, 0, 1, 1, 1, 1, 2, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,22
COMMENTS
Number of i such that d(i)>d(i-1), where Sum{d(i)*2^i: i=0,1,...,m} is base 2 representation of n.
This is the base-2 up-variation sequence; see A297330. - Clark Kimberling, Jan 18 2017
LINKS
Jean-Paul Allouche and Jeffrey Shallit, Sums of digits and the Hurwitz zeta function, in: K. Nagasaka and E. Fouvry (eds.), Analytic Number Theory, Lecture Notes in Mathematics, Vol. 1434, Springer, Berlin, Heidelberg, 1990, pp. 19-30.
Eric Weisstein's World of Mathematics, Digit Block.
FORMULA
a(2n) = a(n), a(2n+1) = a(n) + [n is even]. - Ralf Stephan, Aug 21 2003
G.f.: 1/(1-x) * Sum_{k>=0} t^5/(1+t)/(1+t^2) where t=x^2^k. - Ralf Stephan, Sep 10 2003
a(n) = A069010(n) - 1, n>0. - Ralf Stephan, Sep 10 2003
Sum_{n>=1} a(n)/(n*(n+1)) = log(2)/2 + Pi/4 - 1 = A231902 - 1 (Allouche and Shallit, 1990). - Amiram Eldar, Jun 01 2021
MATHEMATICA
Table[SequenceCount[IntegerDigits[n, 2], {0, 1}], {n, 0, 120}] (* Harvey P. Dale, Aug 10 2023 *)
PROG
(Haskell)
a037800 = f 0 . a030308_row where
f c [_] = c
f c (1 : 0 : bs) = f (c + 1) bs
f c (_ : bs) = f c bs
-- Reinhard Zumkeller, Feb 20 2014
(PARI)
a(n) = { if(n == 0, 0, -1 + hammingweight(bitnegimply(n, n>>1))) }; \\ Gheorghe Coserea, Aug 31 2015
CROSSREFS
Sequence in context: A005590 A142598 A274372 * A144411 A138253 A341969
KEYWORD
nonn,base,easy
AUTHOR
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 23 09:48 EDT 2024. Contains 371905 sequences. (Running on oeis4.)