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.

A173021 Number of numbers <= n whose binary representation is without isolated ones or isolated double ones.

This page as a plain text file.
%I A173021 #21 Oct 16 2024 09:21:54
%S A173021 1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,6,7,7,7,
%T A173021 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,9,9,10,11,11,11,
%U A173021 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
%N A173021 Number of numbers <= n whose binary representation is without isolated ones or isolated double ones.
%H A173021 Reinhard Zumkeller, <a href="/A173021/b173021.txt">Table of n, a(n) for n = 0..10000</a>
%F A173021 a(A173024(n+1)) = a(A173024(n)) + 1.
%F A173021 a(2^n - 1) = A005252(n+1).
%F A173021 a(n) <= A173022(n) <= A173023(n).
%e A173021 a(30) = #{0, 7, 14, 15, 28, 30} = #{0, 111, 1110, 1111, 11100, 11110} = 6.
%t A173021 ioQ[n_]:=Module[{idn2=Split[IntegerDigits[n,2]]},FreeQ[idn2,{1}]&&FreeQ[ idn2,{1,1}]]; Accumulate[Table[If[ioQ[n],1,0],{n,0,90}]] (* _Harvey P. Dale_, May 15 2016 *)
%Y A173021 Cf. A005252, A007088, A173022, A173023, A173024.
%K A173021 base,nonn,look
%O A173021 0,8
%A A173021 _Reinhard Zumkeller_, Feb 07 2010