login
A375124
Weakly decreasing run-leader transformation for standard compositions.
16
0, 1, 2, 1, 4, 2, 6, 1, 8, 4, 2, 2, 12, 6, 6, 1, 16, 8, 4, 4, 20, 2, 10, 2, 24, 12, 6, 6, 12, 6, 6, 1, 32, 16, 8, 8, 4, 4, 18, 4, 40, 20, 2, 2, 20, 10, 10, 2, 48, 24, 12, 12, 52, 6, 26, 6, 24, 12, 6, 6, 12, 6, 6, 1, 64, 32, 16, 16, 8, 8, 34, 8, 72, 4, 4, 4, 36
OFFSET
0,3
COMMENTS
The a(n)-th composition in standard order lists the leaders of weakly decreasing runs in the n-th composition in standard order.
The leaders of weakly decreasing runs in a sequence are obtained by splitting it into maximal weakly decreasing 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.
FORMULA
A000120(a(n)) = A124765(n).
A065120(a(n)) = A065120(n).
A070939(a(n)) = A374741(n).
EXAMPLE
The 813th composition in standard order is (1,3,2,1,2,1), with weakly decreasing runs ((1),(3,2,1),(2,1)), with leaders (1,3,2). This is the 50th composition in standard order, so a(813) = 50.
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
Table[stcinv[First/@Split[stc[n], GreaterEqual]], {n, 0, 100}]
CROSSREFS
Positions of elements of A233564 are A374701, counted by A374743.
Positions of elements of A272919 are A374744, counted by A374742.
Ranks of rows of A374740.
The opposite version is A375123.
The strict version is A375126.
The strict opposite version is A375125.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1) = A070939(n).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Run-length transform is A333627, sum A070939.
- Run-compression transform is A373948, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
- Run-sum transformation is A353847.
Six types of runs:
Sequence in context: A318878 A306408 A232626 * A322250 A175542 A076686
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 02 2024
STATUS
approved