A297030 Number of pieces in the list d(m), d(m-1), ..., d(0) of base-2 digits of n; see Comments.
0, 1, 1, 2, 2, 2, 1, 2, 3, 3, 3, 3, 3, 2, 1, 2, 3, 4, 4, 4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 2, 1, 2, 3, 4, 4, 5, 5, 5, 4, 4, 5, 5, 5, 5, 5, 4, 3, 3, 4, 5, 5, 5, 5, 5, 4, 3, 4, 4, 4, 3, 3, 2, 1, 2, 3, 4, 4, 5, 5, 5, 4, 5, 6, 6, 6, 6, 6, 5, 4, 4, 5, 6, 6, 6, 6, 6
Offset: 1
Examples
Base-2 digits for 100: 1, 1, 0, 0, 1, 0, 0, so that a(100) = 6.
Links
- Clark Kimberling, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
a[n_, b_] := Length[Map[Length, Split[Sign[Differences[IntegerDigits[n, b]]]]]]; b = 2; Table[a[n, b], {n, 1, 120}]
Comments