[go: up one dir, main page]

login
Search: a375127 -id:a375127
     Sort: relevance | references | number | modified | created      Format: long | short | data
Irregular triangle read by rows where row n lists the leaders of anti-runs in the n-th composition in standard order.
+10
35
1, 2, 1, 1, 3, 2, 1, 1, 1, 1, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 3, 3, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 5, 4, 4, 1, 3, 3, 3, 3, 3, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1
OFFSET
0,2
COMMENTS
Anti-runs summing to n are counted by A003242(n).
The leaders of anti-runs in a sequence are obtained by splitting it into maximal consecutive anti-runs (sequences with no adjacent equal terms) and taking the first term of each.
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 maximal anti-runs of the 1234567th composition in standard order are ((3,2,1,2),(2,1,2,5,1),(1),(1)), so row 1234567 is (3,2,1,1).
The nonnegative integers, corresponding compositions, and leaders of anti-runs begin:
0: () -> () 15: (1,1,1,1) -> (1,1,1,1)
1: (1) -> (1) 16: (5) -> (5)
2: (2) -> (2) 17: (4,1) -> (4)
3: (1,1) -> (1,1) 18: (3,2) -> (3)
4: (3) -> (3) 19: (3,1,1) -> (3,1)
5: (2,1) -> (2) 20: (2,3) -> (2)
6: (1,2) -> (1) 21: (2,2,1) -> (2,2)
7: (1,1,1) -> (1,1,1) 22: (2,1,2) -> (2)
8: (4) -> (4) 23: (2,1,1,1) -> (2,1,1)
9: (3,1) -> (3) 24: (1,4) -> (1)
10: (2,2) -> (2,2) 25: (1,3,1) -> (1)
11: (2,1,1) -> (2,1) 26: (1,2,2) -> (1,2)
12: (1,3) -> (1) 27: (1,2,1,1) -> (1,1)
13: (1,2,1) -> (1) 28: (1,1,3) -> (1,1)
14: (1,1,2) -> (1,1) 29: (1,1,2,1) -> (1,1)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Table[First/@Split[stc[n], UnsameQ], {n, 0, 100}]
CROSSREFS
Row-leaders of nonempty rows are A065120.
Row-lengths are A333381.
Row-sums are A374516.
Positions of identical rows are A374519 (counted by A374517).
Positions of distinct (strict) rows are A374638 (counted by A374518).
A106356 counts compositions by number of maximal anti-runs.
A238279 counts compositions by number of maximal runs
A238424 counts partitions whose first differences are an anti-run.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Anti-runs are ranked by A333489, counted by A003242.
- Run-length transform is A333627, sum A070939.
- Run-compression is A373948 or A374251, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
Six types of maximal runs:
KEYWORD
nonn,tabf
AUTHOR
Gus Wiseman, Jul 31 2024
STATUS
approved
Irregular triangle read by rows where row n lists the leaders of strictly decreasing runs in the n-th composition in standard order.
+10
27
1, 2, 1, 1, 3, 2, 1, 2, 1, 1, 1, 4, 3, 2, 2, 2, 1, 1, 3, 1, 2, 1, 1, 2, 1, 1, 1, 1, 5, 4, 3, 3, 1, 2, 3, 2, 2, 2, 2, 2, 1, 1, 1, 4, 1, 3, 1, 2, 2, 1, 2, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 6, 5, 4, 4, 1, 3, 3, 3, 3, 2, 3, 1, 1, 2, 4, 2, 3
OFFSET
0,2
COMMENTS
The leaders of strictly decreasing runs in a sequence are obtained by splitting it into maximal strictly decreasing subsequences and taking the first term of each.
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 1234567th composition in standard order is (3,2,1,2,2,1,2,5,1,1,1), with strictly decreasing runs ((3,2,1),(2),(2,1),(2),(5,1),(1),(1)), so row 1234567 is (3,2,2,2,5,1,1).
The nonnegative integers, corresponding compositions, and leaders of strictly decreasing runs begin:
0: () -> () 15: (1,1,1,1) -> (1,1,1,1)
1: (1) -> (1) 16: (5) -> (5)
2: (2) -> (2) 17: (4,1) -> (4)
3: (1,1) -> (1,1) 18: (3,2) -> (3)
4: (3) -> (3) 19: (3,1,1) -> (3,1)
5: (2,1) -> (2) 20: (2,3) -> (2,3)
6: (1,2) -> (1,2) 21: (2,2,1) -> (2,2)
7: (1,1,1) -> (1,1,1) 22: (2,1,2) -> (2,2)
8: (4) -> (4) 23: (2,1,1,1) -> (2,1,1)
9: (3,1) -> (3) 24: (1,4) -> (1,4)
10: (2,2) -> (2,2) 25: (1,3,1) -> (1,3)
11: (2,1,1) -> (2,1) 26: (1,2,2) -> (1,2,2)
12: (1,3) -> (1,3) 27: (1,2,1,1) -> (1,2,1)
13: (1,2,1) -> (1,2) 28: (1,1,3) -> (1,1,3)
14: (1,1,2) -> (1,1,2) 29: (1,1,2,1) -> (1,1,2)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Table[First/@Split[stc[n], Greater], {n, 0, 100}]
CROSSREFS
Row-leaders of nonempty rows are A065120.
Row-lengths are A124769.
The opposite version is A374683, sum A374684, length A124768.
The weak version is A374740, sum A374741, length A124765.
Row-sums are A374758.
Positions of identical rows are A374759 (counted by A374760).
Positions of distinct (strict) rows are A374767 (counted by A374761).
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Run-length transform is A333627, sum A070939.
- Run-compression transform is A373948, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
- Ranks of non-contiguous compositions are A374253, counted by A335548.
Six types of runs:
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 29 2024
STATUS
approved
Numbers k such that the leaders of strictly decreasing runs in the k-th composition in standard order are distinct.
+10
25
0, 1, 2, 4, 5, 6, 8, 9, 11, 12, 13, 16, 17, 18, 19, 20, 24, 25, 32, 33, 34, 35, 37, 38, 40, 41, 44, 48, 49, 50, 52, 64, 65, 66, 67, 68, 69, 70, 72, 74, 75, 77, 78, 80, 81, 82, 83, 88, 89, 92, 96, 97, 98, 101, 102, 104, 105, 108, 128, 129, 130, 131, 132, 133
OFFSET
1,3
COMMENTS
The leaders of strictly decreasing runs in a sequence are obtained by splitting it into maximal strictly decreasing subsequences and taking the first term of each.
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 10000000th composition in standard order is (3,1,4,3,2,1,2,8), with strictly decreasing runs ((3,1),(4,3,2,1),(2),(8)), with leaders (3,4,2,1) so 10000000 is in the sequence.
The terms together with the corresponding compositions begin:
0: ()
1: (1)
2: (2)
4: (3)
5: (2,1)
6: (1,2)
8: (4)
9: (3,1)
11: (2,1,1)
12: (1,3)
13: (1,2,1)
16: (5)
17: (4,1)
18: (3,2)
19: (3,1,1)
20: (2,3)
24: (1,4)
25: (1,3,1)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], UnsameQ@@First/@Split[stc[#], Greater]&]
CROSSREFS
The opposite version is A374698, counted by A374687.
The weak version is A374701, counted by A374743.
For identical instead of distinct runs we have A374759, counted by A374760.
Compositions of this type are counted by A374761.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Run-length transform is A333627, sum A070939.
- Run-compression transform is A373948, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
Six types of runs:
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 29 2024
STATUS
approved
Numbers k such that the leaders of anti-runs in the k-th composition in standard order (A066099) are distinct.
+10
24
0, 1, 2, 4, 5, 6, 8, 9, 11, 12, 13, 16, 17, 18, 19, 20, 22, 24, 25, 26, 32, 33, 34, 35, 37, 38, 40, 41, 44, 45, 46, 48, 49, 50, 52, 53, 54, 64, 65, 66, 67, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 83, 88, 89, 91, 92, 93, 96, 97, 98, 100, 101, 102, 104
OFFSET
1,3
COMMENTS
The leaders of anti-runs in a sequence are obtained by splitting it into maximal consecutive anti-runs (sequences with no adjacent equal terms) and taking the first term of each.
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 terms together with corresponding compositions begin:
0: ()
1: (1)
2: (2)
4: (3)
5: (2,1)
6: (1,2)
8: (4)
9: (3,1)
11: (2,1,1)
12: (1,3)
13: (1,2,1)
16: (5)
17: (4,1)
18: (3,2)
19: (3,1,1)
20: (2,3)
22: (2,1,2)
24: (1,4)
25: (1,3,1)
26: (1,2,2)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], UnsameQ@@First/@Split[stc[#], UnsameQ]&]
CROSSREFS
Positions of distinct (strict) rows in A374515.
Compositions of this type are counted by A374518.
For identical instead of distinct we have A374519, counted by A374517.
The complement is A374639.
Other types of runs (instead of anti-):
- For identical runs we have A374249, counted by A274174.
- For weakly increasing runs we have A374768, counted by A374632.
- For strictly increasing runs we have A374698, counted by A374687.
- For weakly decreasing runs we have A374701, counted by A374743.
- For strictly decreasing runs we have A374767, counted by A374761.
A065120 gives leaders of standard compositions.
A106356 counts compositions by number of maximal anti-runs.
A238279 counts compositions by number of maximal runs
A238424 counts partitions whose first differences are an anti-run.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Anti-runs are ranked by A333489, counted by A003242.
- Run-length transform is A333627, sum A070939.
- Run-compression transform is A373948, sum A373953, excess A373954.
Six types of maximal runs:
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 01 2024
STATUS
approved
Numbers k such that the leaders of anti-runs in the k-th composition in standard order (A066099) are identical.
+10
23
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 40, 41, 42, 44, 45, 48, 49, 50, 51, 52, 54, 55, 56, 57, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 72, 73, 76, 77, 80, 81, 82, 84, 85
OFFSET
1,3
COMMENTS
The leaders of anti-runs in a sequence are obtained by splitting it into maximal consecutive anti-runs (sequences with no adjacent equal terms) and taking the first term of each.
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 346th composition in standard order is (2,2,1,2,2), with anti-runs ((2),(2,1,2),(2)), with leaders (2,2,2), so 346 is in the sequence.
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], SameQ@@First/@Split[stc[#], UnsameQ]&]
CROSSREFS
Positions of constant rows in A374515.
Compositions of this type are counted by A374517.
The complement is A374520.
For distinct instead of identical leaders we have A374638, counted by A374518.
Other types of runs (instead of anti-):
- For identical runs we have A272919, counted by A000005.
- For weakly increasing runs we have A374633, counted by A374631.
- For strictly increasing runs we have A374685, counted by A374686.
- For weakly decreasing runs we have A374744, counted by A374742.
- For strictly decreasing runs we have A374759, counted by A374760.
A065120 gives leaders of standard compositions.
A106356 counts compositions by number of maximal anti-runs.
A238279 counts compositions by number of maximal runs.
A238424 counts partitions whose first differences are an anti-run.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Anti-runs are ranked by A333489, counted by A003242.
- Run-length transform is A333627, sum A070939.
- Run-compression transform is A373948, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
Six types of maximal runs:
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 01 2024
STATUS
approved
Weakly increasing run-leader transformation for standard compositions.
+10
22
0, 1, 2, 1, 4, 5, 1, 1, 8, 9, 2, 5, 1, 3, 1, 1, 16, 17, 18, 9, 2, 5, 5, 5, 1, 3, 1, 3, 1, 3, 1, 1, 32, 33, 34, 17, 4, 37, 9, 9, 2, 5, 2, 5, 5, 11, 5, 5, 1, 3, 6, 3, 1, 3, 3, 3, 1, 3, 1, 3, 1, 3, 1, 1, 64, 65, 66, 33, 68, 69, 17, 17, 4, 9, 18, 37, 9, 19, 9, 9
OFFSET
0,3
COMMENTS
The a(n)-th composition in standard order lists the leaders of weakly increasing runs of the n-th composition in standard order.
The leaders of weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.
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.
FORMULA
A000120(a(n)) = A124766(n).
A070939(a(n)) = A374630(n) for n > 0.
A065120(a(n)) = A065120(n).
EXAMPLE
The 813th composition in standard order is (1,3,2,1,2,1), with weakly increasing runs ((1,3),(2),(1,2),(1)), with leaders (1,2,1,1). This is the 27th composition in standard order, so a(813) = 27.
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
Table[stcinv[First/@Split[stc[n], LessEqual]], {n, 0, 100}]
CROSSREFS
Positions of elements of A233564 are A374768, counted by A374632.
Positions of elements of A272919 are A374633, counted by A374631.
Ranks of rows of A374629.
The opposite version is A375124.
The strict version is A375125.
The strict opposite version is A375126.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Leader is A065120.
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Run-length transform is A333627, sum A070939.
- Run-sum transformation is A353847.
- Run-compression transform is A373948, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
Six types of runs:
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 02 2024
STATUS
approved
Numbers k such that the leaders of strictly decreasing runs in the k-th composition in standard order are identical.
+10
21
0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 15, 16, 17, 18, 21, 22, 31, 32, 33, 34, 36, 37, 42, 45, 63, 64, 65, 66, 68, 69, 73, 76, 85, 86, 90, 127, 128, 129, 130, 132, 133, 136, 137, 146, 148, 153, 170, 173, 181, 182
OFFSET
1,3
COMMENTS
The leaders of strictly decreasing runs in a sequence are obtained by splitting it into maximal strictly decreasing subsequences and taking the first term of each.
EXAMPLE
The 18789th composition in standard order is (3,3,2,1,3,2,1), with strictly decreasing runs ((3),(3,2,1),(3,2,1)), with leaders (3,3,3), so 18789 is in the sequence.
The terms together with the corresponding compositions begin:
0: ()
1: (1)
2: (2)
3: (1,1)
4: (3)
5: (2,1)
7: (1,1,1)
8: (4)
9: (3,1)
10: (2,2)
15: (1,1,1,1)
16: (5)
17: (4,1)
18: (3,2)
21: (2,2,1)
22: (2,1,2)
31: (1,1,1,1,1)
32: (6)
33: (5,1)
34: (4,2)
36: (3,3)
37: (3,2,1)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], SameQ@@First/@Split[stc[#], Greater]&]
CROSSREFS
For leaders of anti-runs we have A374519 (counted by A374517).
For leaders of weakly increasing runs we have A374633, counted by A374631.
The opposite version is A374685 (counted by A374686).
The weak version is A374744.
Compositions of this type are counted by A374760.
For distinct instead of identical runs we have A374767 (counted by A374761).
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Run-length transform is A333627, sum A070939.
- Run-compression transform is A373948, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
- Ranks of non-contiguous compositions are A374253, counted by A335548.
Six types of runs:
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 29 2024
STATUS
approved
Weakly decreasing run-leader transformation for standard compositions.
+10
16
0, 1, 2, 1, 4, 2, 6, 1, 8, 4, 2, 2, 12, 6, 6, 1, 16, 8, 4, 4, 20, 2, 10, 2, 24, 12, 6, 6, 12, 6, 6, 1, 32, 16, 8, 8, 4, 4, 18, 4, 40, 20, 2, 2, 20, 10, 10, 2, 48, 24, 12, 12, 52, 6, 26, 6, 24, 12, 6, 6, 12, 6, 6, 1, 64, 32, 16, 16, 8, 8, 34, 8, 72, 4, 4, 4, 36
OFFSET
0,3
COMMENTS
The a(n)-th composition in standard order lists the leaders of weakly decreasing runs in the n-th composition in standard order.
The leaders of weakly decreasing runs in a sequence are obtained by splitting it into maximal weakly decreasing subsequences and taking the first term of each.
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.
FORMULA
A000120(a(n)) = A124765(n).
A065120(a(n)) = A065120(n).
A070939(a(n)) = A374741(n).
EXAMPLE
The 813th composition in standard order is (1,3,2,1,2,1), with weakly decreasing runs ((1),(3,2,1),(2,1)), with leaders (1,3,2). This is the 50th composition in standard order, so a(813) = 50.
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
Table[stcinv[First/@Split[stc[n], GreaterEqual]], {n, 0, 100}]
CROSSREFS
Positions of elements of A233564 are A374701, counted by A374743.
Positions of elements of A272919 are A374744, counted by A374742.
Ranks of rows of A374740.
The opposite version is A375123.
The strict version is A375126.
The strict opposite version is A375125.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1) = A070939(n).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Run-length transform is A333627, sum A070939.
- Run-compression transform is A373948, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
- Run-sum transformation is A353847.
Six types of runs:
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 02 2024
STATUS
approved
Strictly increasing run-leader transformation for standard compositions.
+10
16
0, 1, 2, 3, 4, 5, 1, 7, 8, 9, 10, 11, 1, 3, 3, 15, 16, 17, 18, 19, 2, 21, 5, 23, 1, 3, 6, 7, 3, 7, 7, 31, 32, 33, 34, 35, 36, 37, 9, 39, 2, 5, 42, 43, 5, 11, 11, 47, 1, 3, 6, 7, 1, 13, 3, 15, 3, 7, 14, 15, 7, 15, 15, 63, 64, 65, 66, 67, 68, 69, 17, 71, 4, 73
OFFSET
0,3
COMMENTS
The a(n)-th composition in standard order lists the leaders of strictly increasing runs in the n-th composition in standard order.
The leaders of strictly increasing runs in a sequence are obtained by splitting it into maximal strictly increasing subsequences and taking the first term of each.
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.
FORMULA
A000120(a(n)) = A124768(n).
A065120(a(n)) = A065120(n).
A070939(a(n)) = A374684(n).
EXAMPLE
The 813th composition in standard order is (1,3,2,1,2,1), with strictly increasing runs ((1,3),(2),(1,2),(1)), with leaders (1,2,1,1). This is the 27th composition in standard order, so a(813) = 27.
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
Table[stcinv[First/@Split[stc[n], Less]], {n, 0, 100}]
CROSSREFS
Positions of elements of A233564 are A374698, counted by A374687.
Positions of elements of A272919 are A374685, counted by A374686.
Ranks of rows of A374683.
The weak version is A375123.
The weak opposite version is A375124.
The opposite version is A375126.
Other transformations: A375127, A373948.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1) = A070939(n).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Run-length transform is A333627.
- Run-compression transform is A373948, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
- Run-sum transformation is A353847.
Six types of runs:
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 02 2024
STATUS
approved
Strictly decreasing run-leader transformation for standard compositions.
+10
16
0, 1, 2, 3, 4, 2, 6, 7, 8, 4, 10, 5, 12, 6, 14, 15, 16, 8, 4, 9, 20, 10, 10, 11, 24, 12, 26, 13, 28, 14, 30, 31, 32, 16, 8, 17, 36, 4, 18, 19, 40, 20, 42, 21, 20, 10, 22, 23, 48, 24, 12, 25, 52, 26, 26, 27, 56, 28, 58, 29, 60, 30, 62, 63, 64, 32, 16, 33, 8, 8
OFFSET
0,3
COMMENTS
The a(n)-th composition in standard order lists the leaders of strictly decreasing runs in the n-th composition in standard order.
The leaders of strictly decreasing runs in a sequence are obtained by splitting it into maximal strictly decreasing subsequences and taking the first term of each.
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.
Does this sequence contain all nonnegative integers?
FORMULA
A000120(a(n)) = A124769(n).
A065120(a(n)) = A065120(n).
A070939(a(n)) = A374758(n).
EXAMPLE
The 813th composition in standard order is (1,3,2,1,2,1), with strictly decreasing runs ((1),(3,2,1),(2,1)), with leaders (1,3,2). This is the 50th composition in standard order, so a(813) = 50.
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
Table[stcinv[First/@Split[stc[n], Greater]], {n, 0, 100}]
CROSSREFS
Positions of elements of A233564 are A374767, counted by A374761.
Positions of elements of A272919 are A374759, counted by A374760.
Ranks of rows of A374757 (row-sums A374758).
The weak opposite version is A375123.
The weak version is A375124.
The opposite version is A375125.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1) = A070939(n).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Run-length transform is A333627.
- Run-compression transform is A373948, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
- Run-sum transformation is A353847.
Six types of runs:
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 02 2024
STATUS
approved

Search completed in 0.018 seconds