A357137 Maximal run-length of the n-th composition in standard order; a(0) = 0.
0, 1, 1, 2, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 2, 4, 1, 1, 1, 2, 1, 2, 1, 3, 1, 1, 2, 2, 2, 2, 3, 5, 1, 1, 1, 2, 2, 1, 1, 3, 1, 1, 3, 2, 1, 1, 2, 4, 1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 2, 2, 3, 3, 4, 6, 1, 1, 1, 2, 1, 1, 1, 3, 1, 2, 2, 2, 1, 1, 2, 4, 1, 1, 1, 2, 2, 3, 2
Offset: 0
Keywords
Examples
Composition 92 in standard order is (2,1,1,3), so a(92) = 2.
Links
Crossrefs
See link for more sequences related to standard compositions.
The opposite (minimal) version is A357138.
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; Table[If[n==0,0,Max[Length/@Split[stc[n]]]],{n,0,100}]
Comments