A385818 The number k such that the k-th composition in standard order lists the maximal run lengths of each nonnegative integer's binary indices, with duplicates removed.
0, 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 12, 16, 11, 13, 17, 14, 18, 20, 24, 32, 15, 19, 21, 25, 33, 22, 26, 34, 28, 36, 40, 48, 64, 23, 27, 35, 29, 37, 41, 49, 65, 30, 38, 42, 50, 66, 44, 52, 68, 56, 72, 80, 96, 128, 31, 39, 43, 51, 67, 45, 53, 69, 57, 73, 81, 97
Offset: 0
Keywords
Examples
The binary indices of 53 are {1,3,5,6}, with maximal runs ((1),(3),(5,6)) with lengths (1,1,2), which is the 14th composition in standard order, so A385889(53) = 14, and after removing duplicate rows a(16) = 14.
Crossrefs
Programs
-
Mathematica
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1]; stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2; stcinv/@DeleteDuplicates[Table[Length/@Split[bpe[n],#2==#1+1&],{n,0,100}]]
Comments