login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A173022
Number of numbers <= n whose binary representation is without isolated ones.
5
1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 4, 5, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 9, 10, 10, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 16, 17, 17, 17, 18, 19, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21
OFFSET
0,4
LINKS
FORMULA
a(A144795(n+1)) = a(A144795(n)) + 1.
a(2^n - 1) = A005251(n+1).
A173021(n) <= a(n) <= A173023(n).
EXAMPLE
a(20) = #{0,3,6,7,12,14,15} = #{0,11,110,111,1100,1110,1111} = 7.
MATHEMATICA
Accumulate[Array[Boole[FreeQ[Split[IntegerDigits[#, 2]], {1}]] &, 100, 0]] (* Paolo Xausa, Oct 15 2024 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Reinhard Zumkeller, Feb 07 2010
STATUS
approved