%I #21 Oct 16 2024 09:21:54
%S 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 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 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 Number of numbers <= n whose binary representation is without isolated ones or isolated double ones.
%H Reinhard Zumkeller, <a href="/A173021/b173021.txt">Table of n, a(n) for n = 0..10000</a>
%F a(A173024(n+1)) = a(A173024(n)) + 1.
%F a(2^n - 1) = A005252(n+1).
%F a(n) <= A173022(n) <= A173023(n).
%e a(30) = #{0, 7, 14, 15, 28, 30} = #{0, 111, 1110, 1111, 11100, 11110} = 6.
%t 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 Cf. A005252, A007088, A173022, A173023, A173024.
%K base,nonn,look
%O 0,8
%A _Reinhard Zumkeller_, Feb 07 2010