A173023 Number of numbers <= n whose binary representation contains no isolated digits "11".
1, 2, 3, 3, 4, 5, 5, 6, 7, 8, 9, 9, 9, 9, 10, 11, 12, 13, 14, 14, 15, 16, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 24, 24, 25, 26, 26, 27, 28, 29, 30, 30, 30, 30, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 33, 34, 35, 35, 36, 37, 38, 39, 40, 41, 42, 42, 43, 44, 44, 45, 46, 47
Offset: 0
Examples
a(20) = #{0,1,2,4,5,7,8,9,10,14,15,16,17,18,20} = #{0,1,10,100,101,111,1000,1001,1010,1110,1111,10000,10001,10010,10100} = 15.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Programs
-
Mathematica
Accumulate[Table[If[Count[Split[IntegerDigits[n,2]],{1,1}]>0,0,1],{n,0,80}]] (* Harvey P. Dale, Feb 12 2017 *)