login
A390432
First sums of the n-th composition in standard order.
48
2, 3, 3, 2, 2, 4, 4, 3, 2, 4, 3, 3, 2, 3, 2, 2, 2, 5, 5, 4, 2, 5, 4, 3, 3, 3, 3, 2, 2, 5, 4, 4, 3, 4, 3, 3, 2, 2, 4, 2, 3, 3, 2, 2, 3, 2, 2, 2, 2, 6, 6, 5, 2, 6, 5, 3, 4, 3, 4, 2, 2, 6, 5, 4, 4, 4, 4, 3, 2, 3, 4, 3, 3, 3, 3, 2, 3, 3, 2, 2, 2, 6, 5, 5, 4, 5
OFFSET
3,1
COMMENTS
The first sums of a nonempty sequence (a, b, c, d, ...) are (a+b, b+c, c+d, ...).
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
Triangle begins (dots indicate empty rows):
1: .
2: .
3: 2
4: .
5: 3
6: 3
7: 2 2
8: .
9: 4
10: 4
11: 3 2
12: 4
13: 3 3
14: 2 3
15: 2 2 2
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
firsums[c_]:=Table[c[[i]]+c[[i+1]], {i, Length[c]-1}];
Table[firsums[stc[n]], {n, 0, 100}]
CROSSREFS
First sums of rows of A066099.
For Heinz numbers and first differences we have A355536, ranks A253566.
For first differences instead of first sums we have A358133.
For partial sums instead of first sums we have A358134.
The version for Heinz numbers of partitions is A390307, ranks A390449.
Rows have standard composition numbers A390568.
A011782 counts compositions.
A342527 counts compositions with all equal first sums.
A351014 counts distinct runs in standard compositions.
A390567 counts compositions with distinct first sums.
Sequence in context: A030423 A130631 A282014 * A241539 A376893 A213512
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 11 2025
STATUS
approved