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 A056976 #19 Feb 16 2025 08:32:43 %S A056976 0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,1, %T A056976 0,1,1,0,0,1,1,2,1,0,0,0,0,0,0,1,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1, %U A056976 1,0,0,1,1,2,1,0,0,0,0,1,1,2,1,2,2,1,1,0,0,1,0,0,0,0,0,0,0,1,0,1,1,0 %N A056976 Number of blocks of {0, 1, 0} in the binary expansion of n. %H A056976 Gheorghe Coserea, <a href="/A056976/b056976.txt">Table of n, a(n) for n = 1..10000</a> %H A056976 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DigitBlock.html">Digit Block</a> %F A056976 a(2n) = a(n) + [n>1 and n congruent to 1 mod 4], a(2n+1) = a(n). - _Ralf Stephan_, Aug 22 2003 %t A056976 a[n_, bits_] := (idn = IntegerDigits[n, 2]; ln = Length[idn]; lb = Length[bits]; For[cnt = 0; k = 1, k <= ln - lb + 1, k++, If[idn[[k ;; k + lb - 1]] == bits, cnt++]]; cnt); Table[ a[n, {0, 1, 0}], {n, 1, 102} ] (* _Jean-François Alcover_, Oct 23 2012 *) %t A056976 Table[SequenceCount[IntegerDigits[n,2],{0,1,0},Overlaps->True],{n,120}] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 11 2019 *) %o A056976 (PARI) %o A056976 a(n) = { %o A056976 if (n < 10, return(0)); %o A056976 my(k = logint(n,2) - 1); %o A056976 hammingweight(bitnegimply(n>>1, bitor(n, n >> 2))) - !bittest(n,k) %o A056976 }; %o A056976 vector(102, i, a(i)) \\ _Gheorghe Coserea_, Sep 17 2015 %Y A056976 Cf. A014082, A056974, A056975, A056976, A056977, A056978, A056979, A056980. %K A056976 nonn,easy %O A056976 1,42 %A A056976 _Eric W. Weisstein_