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.

A056975 Number of blocks of {0, 0, 1} in binary expansion of n.

This page as a plain text file.
%I A056975 #20 Feb 16 2025 08:32:43
%S A056975 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,
%T A056975 1,1,1,1,1,0,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,1,1,
%U A056975 1,1,1,1,2,1,1,1,1,1,1,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,1,1,1,1
%N A056975 Number of blocks of {0, 0, 1} in binary expansion of n.
%H A056975 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DigitBlock.html">Digit Block</a>
%F A056975 a(2n) = a(n), a(2n+1) = a(n) + [n congruent to 0 mod 4]. - _Ralf Stephan_, Aug 22 2003
%t A056975 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, 0, 1}], {n, 1, 102} ] (* _Jean-François Alcover_, Oct 23 2012 *)
%t A056975 Table[SequenceCount[IntegerDigits[n,2],{0,0,1}],{n,110}] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Apr 26 2019 *)
%Y A056975 Cf. A007088 (binary expansion).
%Y A056975 Other block counts: A014082, A056974, A056976, A056977, A056978, A056979, A056980.
%K A056975 nonn,base,easy
%O A056975 1,73
%A A056975 _Eric W. Weisstein_