OFFSET
1,2
COMMENTS
Row 0 is empty so offset is 1.
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
The 6th standard composition is (1,2), with 0-prepended parts (0,1,2), with first differences (1,1), so row 6 is (1,1).
Triangle begins:
0: .
1: 1
2: 2
3: 1 0
4: 3
5: 2 -1
6: 1 1
7: 1 0 0
8: 4
9: 3 -2
10: 2 0
11: 2 -1 0
12: 1 2
13: 1 1 -1
14: 1 0 1
15: 1 0 0 0
16: 5
17: 4 -3
18: 3 -1
19: 3 -2 0
20: 2 1
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Table[Differences[Prepend[stc[n], 0]], {n, 0, 10}]
CROSSREFS
Row lengths are A000120.
Row sums are A001511.
First term in each row is A065120.
Zeros in each row are counted by A124762.
Without prepending we get A358133.
Positions of constant rows are A389732.
A011782 counts compositions.
A066099 lists compositions in standard order.
A070939 gives sum of standard compositions.
KEYWORD
sign,tabf
AUTHOR
Gus Wiseman, Oct 23 2025
STATUS
approved
