cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A037800 Number of occurrences of 01 in the binary expansion of n.

This page as a plain text file.
%I A037800 #35 Feb 16 2025 08:32:37
%S A037800 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,
%T A037800 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,
%U A037800 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
%N A037800 Number of occurrences of 01 in the binary expansion of n.
%C A037800 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.
%C A037800 This is the base-2 up-variation sequence; see A297330. - _Clark Kimberling_, Jan 18 2017
%H A037800 Reinhard Zumkeller, <a href="/A037800/b037800.txt">Table of n, a(n) for n = 0..10000</a>
%H A037800 Jean-Paul Allouche and Jeffrey Shallit, <a href="https://doi.org/10.1007/BFb0097122">Sums of digits and the Hurwitz zeta function</a>, in: K. Nagasaka and E. Fouvry (eds.), Analytic Number Theory, Lecture Notes in Mathematics, Vol. 1434, Springer, Berlin, Heidelberg, 1990, pp. 19-30.
%H A037800 Ralf Stephan, <a href="/somedcgf.html">Some divide-and-conquer sequences with (relatively) simple ordinary generating functions</a>, 2004.
%H A037800 Ralf Stephan, <a href="/A079944/a079944.ps">Table of generating functions</a>.
%H A037800 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DigitBlock.html">Digit Block</a>.
%H A037800 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A037800 a(2n) = a(n), a(2n+1) = a(n) + [n is even]. - _Ralf Stephan_, Aug 21 2003
%F A037800 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
%F A037800 a(n) = A069010(n) - 1, n>0. - _Ralf Stephan_, Sep 10 2003
%F A037800 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
%t A037800 Table[SequenceCount[IntegerDigits[n,2],{0,1}],{n,0,120}] (* _Harvey P. Dale_, Aug 10 2023 *)
%o A037800 (Haskell)
%o A037800 a037800 = f 0 . a030308_row where
%o A037800    f c [_]          = c
%o A037800    f c (1 : 0 : bs) = f (c + 1) bs
%o A037800    f c (_ : bs)     = f c bs
%o A037800 -- _Reinhard Zumkeller_, Feb 20 2014
%o A037800 (PARI)
%o A037800 a(n) = { if(n == 0, 0, -1 + hammingweight(bitnegimply(n, n>>1))) };  \\ _Gheorghe Coserea_, Aug 31 2015
%Y A037800 Cf. A014081, A014082, A033264, A056974, A056975, A056976, A056977, A056978, A056979, A056980.
%Y A037800 Cf. A030308, A231902.
%K A037800 nonn,base,easy
%O A037800 0,22
%A A037800 _Clark Kimberling_