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.
%I A056973 #38 Feb 16 2025 08:32:43 %S A056973 0,0,0,1,0,0,0,2,1,0,0,1,0,0,0,3,2,1,1,1,0,0,0,2,1,0,0,1,0,0,0,4,3,2, %T A056973 2,2,1,1,1,2,1,0,0,1,0,0,0,3,2,1,1,1,0,0,0,2,1,0,0,1,0,0,0,5,4,3,3,3, %U A056973 2,2,2,3,2,1,1,2,1,1,1,3,2,1,1,1,0,0,0,2,1,0,0,1,0,0,0,4,3,2,2,2,1,1 %N A056973 Number of blocks of {0,0} in the binary expansion of n. %H A056973 Reinhard Zumkeller, <a href="/A056973/b056973.txt">Table of n, a(n) for n = 1..10000</a> %H A056973 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 A056973 Ralf Stephan, <a href="/somedcgf.html">Some divide-and-conquer sequences with (relatively) simple ordinary generating functions</a>, 2004. %H A056973 Ralf Stephan, <a href="/A079944/a079944.ps">Table of generating functions</a>. %H A056973 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DigitBlock.html">Digit Block</a>. %H A056973 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A056973 a(2n) = a(n) + [n is even], a(2n+1) = a(n). %F A056973 G.f.: 1/(1-x) * Sum_{k>=0} t^4/((1+t)*(1+t^2)) where t=x^(2^k). - _Ralf Stephan_, Sep 10 2003 %F A056973 a(n) = A023416(n) - A033264(n). - _Ralf Stephan_, Sep 10 2003 %F A056973 Sum_{n>=1} a(n)/(n*(n+1)) = 2 - 3*log(2)/2 - Pi/4 (Allouche and Shallit, 1990). - _Amiram Eldar_, Jun 01 2021 %p A056973 f:= proc(n) option remember; %p A056973 if n mod 4 = 0 then 1 + procname(n/2) %p A056973 else procname(floor(n/2)) %p A056973 fi %p A056973 end proc: %p A056973 f(1):= 0: %p A056973 map(f, [$1..200]); # _Robert Israel_, Sep 02 2015 %t A056973 f[n_] := Count[Partition[IntegerDigits[n, 2], 2, 1], {0, 0}]; Table[f@ n, {n, 0, 102}] (* _Michael De Vlieger_, Sep 01 2015, after _Robert G. Wilson v_ at A014081 *) %t A056973 SequenceCount[#,{0,0},Overlaps->True]&/@(IntegerDigits[#,2]&/@Range[0,120]) (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 24 2018 *) %o A056973 (Haskell) %o A056973 a056973 = f 0 where %o A056973 f y x = if x == 0 then y else f (y + 0 ^ (mod x 4)) $ div x 2 %o A056973 -- _Reinhard Zumkeller_, Mar 31 2015 %o A056973 (PARI) %o A056973 a(n) = { my(x = bitor(n, n>>1)); %o A056973 if (x == 0, 0, 1 + logint(x, 2) - hammingweight(x)) } %o A056973 vector(102, i, a(i)) \\ _Gheorghe Coserea_, Sep 01 2015 %Y A056973 Cf. A003754, A014081, A023416, A033264, A037800. %Y A056973 Cf. A107782. %K A056973 nonn,base %O A056973 1,8 %A A056973 _Eric W. Weisstein_