The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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.
For parts instead of run-lengths we have A333766, minimal A333768.
The opposite (minimal) version is A357138.
For first instead of maximal we have A357180, last A357181.
Sequence in context: A135222 A285706 A357181 * A333381 A124094 A101950
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 18 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 28 19:55 EDT 2024. Contains 372919 sequences. (Running on oeis4.)