A385887 The number k such that the k-th composition in standard order is the reversed sequence of lengths of maximal runs of binary indices of n.
0, 1, 1, 2, 1, 3, 2, 4, 1, 3, 3, 6, 2, 5, 4, 8, 1, 3, 3, 6, 3, 7, 6, 12, 2, 5, 5, 10, 4, 9, 8, 16, 1, 3, 3, 6, 3, 7, 6, 12, 3, 7, 7, 14, 6, 13, 12, 24, 2, 5, 5, 10, 5, 11, 10, 20, 4, 9, 9, 18, 8, 17, 16, 32, 1, 3, 3, 6, 3, 7, 6, 12, 3, 7, 7, 14, 6, 13, 12, 24
Offset: 0
Keywords
Examples
The binary indices of 100 are {3,6,7}, with maximal runs ((3),(6,7)), with reversed lengths (2,1), which is the 5th composition in standard order, so a(100) = 5.
Links
Crossrefs
Programs
-
Mathematica
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1]; stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2; Table[stcinv[Reverse[Length/@Split[bpe[n],#2==#1+1&]]],{n,0,100}]
Comments