login
A337565
Irregular triangle read by rows where row k is the sequence of maximal anti-run lengths in the k-th composition in standard order.
5
1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 3, 1, 1, 2, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 3, 3, 2, 1, 1, 2, 3, 1, 1, 1, 1, 2, 1, 3, 4, 2, 2, 2, 1, 1, 1, 2, 3, 3
OFFSET
0,6
COMMENTS
An anti-run is a sequence with no adjacent equal parts.
A composition of n is a finite sequence of positive integers summing to n. 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 first column below lists various selected n; the second column gives the corresponding composition; the third column gives the corresponding row of the triangle, i.e., the anti-run lengths.
1: (1) -> (1)
3: (1,1) -> (1,1)
5: (2,1) -> (2)
7: (1,1,1) -> (1,1,1)
11: (2,1,1) -> (2,1)
13: (1,2,1) -> (3)
14: (1,1,2) -> (1,2)
15: (1,1,1,1) -> (1,1,1,1)
23: (2,1,1,1) -> (2,1,1)
27: (1,2,1,1) -> (3,1)
29: (1,1,2,1) -> (1,3)
30: (1,1,1,2) -> (1,1,2)
31: (1,1,1,1,1) -> (1,1,1,1,1)
43: (2,2,1,1) -> (1,2,1)
45: (2,1,2,1) -> (4)
46: (2,1,1,2) -> (2,2)
47: (2,1,1,1,1) -> (2,1,1,1)
55: (1,2,1,1,1) -> (3,1,1)
59: (1,1,2,1,1) -> (1,3,1)
61: (1,1,1,2,1) -> (1,1,3)
62: (1,1,1,1,2) -> (1,1,1,2)
63: (1,1,1,1,1,1) -> (1,1,1,1,1,1)
For example, the 119th composition is (1,1,2,1,1,1), with maximal anti-runs ((1),(1,2,1),(1),(1)), so row 119 is (1,3,1,1).
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Table[Length/@Split[stc[n], UnsameQ], {n, 0, 50}]
CROSSREFS
A000120 gives row sums.
A333381 gives row lengths.
A333769 is the version for runs.
A003242 counts anti-run compositions.
A011782 counts compositions.
A106351 counts anti-run compositions by length.
A329744 is a triangle counting compositions by runs-resistance.
A333755 counts compositions by number of runs.
All of the following pertain to compositions in standard order (A066099):
- Sum is A070939.
- Adjacent equal pairs are counted by A124762.
- Runs are counted by A124767.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Patterns are A333217.
- Heinz number is A333219.
- Anti-runs are counted by A333381.
- Anti-run compositions are A333489.
- Runs-resistance is A333628.
- Combinatory separations are A334030.
Sequence in context: A184318 A030410 A085301 * A138385 A030614 A328615
KEYWORD
nonn,tabf
AUTHOR
Gus Wiseman, Sep 07 2020
STATUS
approved