login
A389733
Irregular triangle read by rows where row n is the 0-prepended first differences of the n-th composition in standard order.
7
1, 2, 1, 0, 3, 2, -1, 1, 1, 1, 0, 0, 4, 3, -2, 2, 0, 2, -1, 0, 1, 2, 1, 1, -1, 1, 0, 1, 1, 0, 0, 0, 5, 4, -3, 3, -1, 3, -2, 0, 2, 1, 2, 0, -1, 2, -1, 1, 2, -1, 0, 0, 1, 3, 1, 2, -2, 1, 1, 0, 1, 1, -1, 0, 1, 0, 2, 1, 0, 1, -1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 6, 5, -4, 4, -2
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.
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.
For Heinz numbers of partitions we get A287352, without prepending A355536.
Without prepending we get A358133.
Positions of constant rows are A389732.
Positions of strict rows are A389734, without prepending A389597.
A007862 counts partitions with constant 0-prepended differences, ranks A325327.
A011782 counts compositions.
A066099 lists compositions in standard order.
A070939 gives sum of standard compositions.
A124767 counts maximal runs in standard compositions, anti-runs A333381.
Sequence in context: A274183 A212278 A244215 * A391983 A255325 A391368
KEYWORD
sign,tabf
AUTHOR
Gus Wiseman, Oct 23 2025
STATUS
approved