|
|
A357137
|
|
Maximal run-length of the n-th composition in standard order; a(0) = 0.
|
|
9
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
|
|
LINKS
|
|
|
EXAMPLE
|
Composition 92 in standard order is (2,1,1,3), so a(92) = 2.
|
|
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}]
|
|
CROSSREFS
|
See link for more sequences related to standard compositions.
The version for Heinz numbers of partitions is A051903, for parts A061395.
The opposite (minimal) version is A357138.
Cf. A000120, A001511, A003754, A029931, A051904, A055396, A056239, A070939, A286470, A356844, A357136.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|