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.
LINKS
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 first differences instead of first sums we have A358133.
For partial sums instead of first sums we have A358134.
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 11 2025
STATUS
approved
