A385816 The number k such that the k-th composition in standard order lists the maximal anti-run lengths of the binary indices of n. Standard composition number of row n of A384877.
0, 1, 1, 3, 1, 2, 3, 7, 1, 2, 2, 6, 3, 5, 7, 15, 1, 2, 2, 6, 2, 4, 6, 14, 3, 5, 5, 13, 7, 11, 15, 31, 1, 2, 2, 6, 2, 4, 6, 14, 2, 4, 4, 12, 6, 10, 14, 30, 3, 5, 5, 13, 5, 9, 13, 29, 7, 11, 11, 27, 15, 23, 31, 63, 1, 2, 2, 6, 2, 4, 6, 14, 2, 4, 4, 12, 6, 10, 14
Offset: 0
Keywords
Examples
The binary indices of 181 are {1,3,5,6,8}, with maximal anti-runs ((1,3,5),(6,8)), with lengths (3,2), which is the 18th composition in standard order, so a(181) = 18.
Links
Programs
-
Mathematica
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1]; stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2; stcinv/@Table[Length/@Split[bpe[n],#2!=#1+1&],{n,0,100}]
Comments