login
A374630
Sum of leaders of weakly increasing runs in the n-th composition in standard order.
28
0, 1, 2, 1, 3, 3, 1, 1, 4, 4, 2, 3, 1, 2, 1, 1, 5, 5, 5, 4, 2, 3, 3, 3, 1, 2, 1, 2, 1, 2, 1, 1, 6, 6, 6, 5, 3, 6, 4, 4, 2, 3, 2, 3, 3, 4, 3, 3, 1, 2, 3, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 7, 7, 7, 6, 7, 7, 5, 5, 3, 4, 5, 6, 4, 5, 4, 4, 2, 3, 4, 3, 2, 3, 3
OFFSET
0,3
COMMENTS
The leaders of weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.
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.
EXAMPLE
The maximal weakly increasing subsequences of the 1234567th composition in standard order are ((3),(2),(1,2,2),(1,2,5),(1,1,1)), so a(1234567) = 8.
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Table[Total[First/@Split[stc[n], LessEqual]], {n, 0, 100}]
CROSSREFS
For length instead of sum we have A124766.
For leaders of constant runs we have A373953, excess A373954.
For leaders of anti-runs we have A374516.
Row-sums of A374629.
Counting compositions by this statistic gives A374637.
For leaders of strictly increasing runs we have A374684.
For leaders of weakly decreasing runs we have A374741.
For leaders of strictly decreasing runs we have A374758
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A335456 counts patterns matched by compositions.
A373949 counts compositions by run-compressed sum, opposite A373951.
All of the following pertain to compositions in standard order:
- Ones are counted by A000120.
- Sum is A029837 (or sometimes A070939).
- Listed by A066099.
- Length is A070939.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Number of max runs: A124765, A124766, A124767, A124768, A124769, A333381.
- Ranks of strict compositions are A233564, counted by A032020.
- Constant compositions are ranked by A272919.
- Ranks of anti-run compositions are A333489, counted by A003242.
- Run-length transform is A333627.
- Run-compression transform is A373948.
Sequence in context: A162883 A081446 A274309 * A158440 A119803 A195916
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 20 2024
STATUS
approved