A374629
Irregular triangle listing the leaders of maximal weakly increasing runs in the n-th composition in standard order.
Original entry on oeis.org
1, 2, 1, 3, 2, 1, 1, 1, 4, 3, 1, 2, 2, 1, 1, 1, 1, 1, 1, 5, 4, 1, 3, 2, 3, 1, 2, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 5, 1, 4, 2, 4, 1, 3, 3, 2, 1, 3, 1, 3, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0
The 58654th composition in standard order is (1,1,3,2,4,1,1,1,2), with maximal weakly increasing runs ((1,1,3),(2,4),(1,1,1,2)), so row 58654 is (1,2,1).
The nonnegative integers, corresponding compositions, and leaders of maximal weakly increasing runs begin:
0: () -> () 15: (1,1,1,1) -> (1)
1: (1) -> (1) 16: (5) -> (5)
2: (2) -> (2) 17: (4,1) -> (4,1)
3: (1,1) -> (1) 18: (3,2) -> (3,2)
4: (3) -> (3) 19: (3,1,1) -> (3,1)
5: (2,1) -> (2,1) 20: (2,3) -> (2)
6: (1,2) -> (1) 21: (2,2,1) -> (2,1)
7: (1,1,1) -> (1) 22: (2,1,2) -> (2,1)
8: (4) -> (4) 23: (2,1,1,1) -> (2,1)
9: (3,1) -> (3,1) 24: (1,4) -> (1)
10: (2,2) -> (2) 25: (1,3,1) -> (1,1)
11: (2,1,1) -> (2,1) 26: (1,2,2) -> (1)
12: (1,3) -> (1) 27: (1,2,1,1) -> (1,1)
13: (1,2,1) -> (1,1) 28: (1,1,3) -> (1)
14: (1,1,2) -> (1) 29: (1,1,2,1) -> (1,1)
Positions of non-weakly decreasing rows are
A375137.
A335456 counts patterns matched by compositions.
All of the following pertain to compositions in standard order:
- Ranks of non-contiguous compositions are
A374253, counted by
A335548.
Cf.
A046660,
A106356,
A188920,
A189076,
A238343,
A272919,
A333213,
A373949,
A374634,
A374635,
A374637,
A374701,
A375123.
-
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Table[First/@Split[stc[n],LessEqual],{n,0,100}]
A373949
Triangle read by rows where T(n,k) is the number of integer compositions of n such that replacing each run of repeated parts with a single part (run-compression) yields a composition of k.
Original entry on oeis.org
1, 0, 1, 0, 1, 1, 0, 1, 0, 3, 0, 1, 1, 2, 4, 0, 1, 0, 4, 4, 7, 0, 1, 1, 5, 6, 5, 14, 0, 1, 0, 6, 10, 10, 14, 23, 0, 1, 1, 6, 14, 12, 29, 26, 39, 0, 1, 0, 9, 16, 19, 40, 54, 46, 71, 0, 1, 1, 8, 22, 22, 64, 82, 96, 92, 124, 0, 1, 0, 10, 26, 30, 82, 137, 144, 204, 176, 214
Offset: 0
Triangle begins:
1
0 1
0 1 1
0 1 0 3
0 1 1 2 4
0 1 0 4 4 7
0 1 1 5 6 5 14
0 1 0 6 10 10 14 23
0 1 1 6 14 12 29 26 39
0 1 0 9 16 19 40 54 46 71
0 1 1 8 22 22 64 82 96 92 124
0 1 0 10 26 30 82 137 144 204 176 214
0 1 1 11 32 31 121 186 240 331 393 323 378
Row n = 6 counts the following compositions:
. (111111) (222) (33) (3111) (411) (6)
(2211) (1113) (114) (51)
(1122) (1221) (1311) (15)
(21111) (12111) (1131) (42)
(11112) (11211) (2112) (24)
(11121) (141)
(321)
(312)
(231)
(213)
(132)
(123)
(2121)
(1212)
For example, the composition (1,2,2,1) with compression (1,2,1) is counted under T(6,4).
Column k = n is
A003242 (anti-runs or compressed compositions).
Same as
A373951 with rows reversed.
A114901 counts compositions with no isolated parts.
A116861 counts partitions by compressed sum, by compressed length
A116608.
A240085 counts compositions with no unique parts.
A333755 counts compositions by compressed length.
A373948 represents the run-compression transformation.
-
Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],Total[First/@Split[#]]==k&]], {n,0,10},{k,0,n}]
-
T_xy(row_max) = {my(N=row_max+1, x='x+O('x^N), h=1/(1-sum(i=1,N, (y^i*x^i)/(1+x^i*(y^i-1))))); vector(N, n, Vecrev(polcoeff(h, n-1)))}
T_xy(13) \\ John Tyler Rascoe, Mar 20 2025
A373948
Run-compression encoded as a transformation of compositions in standard order.
Original entry on oeis.org
0, 1, 2, 1, 4, 5, 6, 1, 8, 9, 2, 5, 12, 13, 6, 1, 16, 17, 18, 9, 20, 5, 22, 5, 24, 25, 6, 13, 12, 13, 6, 1, 32, 33, 34, 17, 4, 37, 38, 9, 40, 41, 2, 5, 44, 45, 22, 5, 48, 49, 50, 25, 52, 13, 54, 13, 24, 25, 6, 13, 12, 13, 6, 1, 64, 65, 66, 33, 68, 69, 70, 17, 72
Offset: 0
The standard compositions and their compressions begin:
0: () --> 0: ()
1: (1) --> 1: (1)
2: (2) --> 2: (2)
3: (1,1) --> 1: (1)
4: (3) --> 4: (3)
5: (2,1) --> 5: (2,1)
6: (1,2) --> 6: (1,2)
7: (1,1,1) --> 1: (1)
8: (4) --> 8: (4)
9: (3,1) --> 9: (3,1)
10: (2,2) --> 2: (2)
11: (2,1,1) --> 5: (2,1)
12: (1,3) --> 12: (1,3)
13: (1,2,1) --> 13: (1,2,1)
14: (1,1,2) --> 6: (1,2)
15: (1,1,1,1) --> 1: (1)
Sum of standard composition for a(n) is given by
A373953, length
A124767.
A037201 gives compression of first differences of primes, halved
A373947.
A066099 lists the parts of all compositions in standard order.
A114901 counts compositions with no isolated parts.
A240085 counts compositions with no unique parts.
A333755 counts compositions by compressed length.
-
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]]],{n,0,30}]
A374632
Number of integer compositions of n whose leaders of weakly increasing runs are distinct.
Original entry on oeis.org
1, 1, 2, 4, 7, 13, 23, 40, 69, 119, 200, 335, 557, 917, 1499, 2433, 3920, 6280, 10004, 15837, 24946, 39087, 60952, 94606, 146203, 224957, 344748, 526239, 800251, 1212527, 1830820, 2754993, 4132192, 6178290, 9209308, 13686754, 20282733, 29973869, 44175908, 64936361
Offset: 0
The composition (4,2,2,1,1,3) has weakly increasing runs ((4),(2,2),(1,1,3)), with leaders (4,2,1), so is counted under a(13).
The a(0) = 1 through a(5) = 13 compositions:
() (1) (2) (3) (4) (5)
(11) (12) (13) (14)
(21) (22) (23)
(111) (31) (32)
(112) (41)
(211) (113)
(1111) (122)
(212)
(221)
(311)
(1112)
(2111)
(11111)
Types of runs (instead of weakly increasing):
- For leaders of strictly increasing runs we have
A374687, ranks
A374698.
- For leaders of weakly decreasing runs we have
A374743, ranks
A335467.
- For leaders of strictly decreasing runs we have
A374761, ranks
A374767.
Types of run-leaders (instead of distinct):
- For strictly decreasing leaders we appear to have
A188920.
- For weakly decreasing leaders we appear to have
A189076.
- For identical leaders we have
A374631.
- For weakly increasing leaders we have
A374635.
- For strictly increasing leaders we have
A374634.
A003242 counts anti-run compositions.
A335456 counts patterns matched by compositions.
A374637 counts compositions by sum of leaders of weakly increasing runs.
-
Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],UnsameQ@@First/@Split[#,LessEqual]&]],{n,0,15}]
-
dfs(m, r, v) = 1 + sum(s=1, min(m, r-1), if(!setsearch(v, s), dfs(m-s, s, setunion(v, [s]))*x^s/(1-x^s) + sum(t=s+1, m-s, dfs(m-s-t, t, setunion(v, [s]))*x^(s+t)/prod(i=s, t, 1-x^i))));
lista(nn) = Vec(dfs(nn, nn+1, []) + O(x^(1+nn))); \\ Jinyuan Wang, Feb 13 2025
A373954
Excess run-compression of standard compositions. Sum of all parts minus sum of compressed parts of the n-th integer composition in standard order.
Original entry on oeis.org
0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 2, 1, 0, 0, 1, 3, 0, 0, 0, 1, 0, 2, 0, 2, 0, 0, 2, 1, 1, 1, 2, 4, 0, 0, 0, 1, 3, 0, 0, 2, 0, 0, 4, 3, 0, 0, 1, 3, 0, 0, 0, 1, 0, 2, 0, 2, 1, 1, 3, 2, 2, 2, 3, 5, 0, 0, 0, 1, 0, 0, 0, 2, 0, 3, 2, 1, 0, 0, 1, 3, 0, 0, 0, 1, 2, 4, 2
Offset: 0
The excess compression of (2,1,1,3) is 1, so a(92) = 1.
Compression of standard compositions is
A373953.
A037201 gives compression of first differences of primes, halved
A373947.
A066099 lists the parts of all compositions in standard order.
A114901 counts compositions with no isolated parts.
A240085 counts compositions with no unique parts.
A333627 takes the rank of a composition to the rank of its run-lengths.
-
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Table[Total[stc[n]]-Total[First/@Split[stc[n]]],{n,0,100}]
A374683
Irregular triangle read by rows where row n lists the leaders of strictly increasing runs in the n-th composition in standard order.
Original entry on oeis.org
1, 2, 1, 1, 3, 2, 1, 1, 1, 1, 1, 4, 3, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 1, 3, 2, 3, 1, 1, 2, 2, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 5, 1, 4, 2, 4, 1, 1, 3, 3, 3, 2, 1, 3, 1, 3, 1, 1, 1
Offset: 0
The maximal strictly increasing subsequences 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,2,1,1,1,1).
The nonnegative integers, corresponding compositions, and leaders of strictly increasing 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,1)
3: (1,1) -> (1,1) 18: (3,2) -> (3,2)
4: (3) -> (3) 19: (3,1,1) -> (3,1,1)
5: (2,1) -> (2,1) 20: (2,3) -> (2)
6: (1,2) -> (1) 21: (2,2,1) -> (2,2,1)
7: (1,1,1) -> (1,1,1) 22: (2,1,2) -> (2,1)
8: (4) -> (4) 23: (2,1,1,1) -> (2,1,1,1)
9: (3,1) -> (3,1) 24: (1,4) -> (1)
10: (2,2) -> (2,2) 25: (1,3,1) -> (1,1)
11: (2,1,1) -> (2,1,1) 26: (1,2,2) -> (1,2)
12: (1,3) -> (1) 27: (1,2,1,1) -> (1,1,1)
13: (1,2,1) -> (1,1) 28: (1,1,3) -> (1,1)
14: (1,1,2) -> (1,1) 29: (1,1,2,1) -> (1,1,1)
All of the following pertain to compositions in standard order:
- Ranks of non-contiguous compositions are
A374253, counted by
A335548.
-
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Table[First/@Split[stc[n],Less],{n,0,100}]
A374740
Irregular triangle read by rows where row n lists the leaders of weakly decreasing runs in the n-th composition in standard order.
Original entry on oeis.org
1, 2, 1, 3, 2, 1, 2, 1, 4, 3, 2, 2, 1, 3, 1, 2, 1, 2, 1, 5, 4, 3, 3, 2, 3, 2, 2, 2, 2, 1, 4, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 6, 5, 4, 4, 3, 3, 3, 2, 3, 2, 4, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 1, 5, 1, 4, 1, 3, 1, 3, 1, 2, 3, 1, 2, 1, 2, 2, 1, 2, 1, 4
Offset: 0
The maximal weakly decreasing subsequences 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,2,5).
The nonnegative integers, corresponding compositions, and leaders of weakly decreasing runs begin:
0: () -> () 15: (1,1,1,1) -> (1)
1: (1) -> (1) 16: (5) -> (5)
2: (2) -> (2) 17: (4,1) -> (4)
3: (1,1) -> (1) 18: (3,2) -> (3)
4: (3) -> (3) 19: (3,1,1) -> (3)
5: (2,1) -> (2) 20: (2,3) -> (2,3)
6: (1,2) -> (1,2) 21: (2,2,1) -> (2)
7: (1,1,1) -> (1) 22: (2,1,2) -> (2,2)
8: (4) -> (4) 23: (2,1,1,1) -> (2)
9: (3,1) -> (3) 24: (1,4) -> (1,4)
10: (2,2) -> (2) 25: (1,3,1) -> (1,3)
11: (2,1,1) -> (2) 26: (1,2,2) -> (1,2)
12: (1,3) -> (1,3) 27: (1,2,1,1) -> (1,2)
13: (1,2,1) -> (1,2) 28: (1,1,3) -> (1,3)
14: (1,1,2) -> (1,2) 29: (1,1,2,1) -> (1,2)
All of the following pertain to compositions in standard order:
- Ranks of non-contiguous compositions are
A374253, counted by
A335548.
-
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Table[First/@Split[stc[n],GreaterEqual],{n,0,100}]
A373951
Triangle read by rows where T(n,k) is the number of integer compositions of n such that replacing each run of repeated parts with a single part (run-compression) yields a composition of n - k.
Original entry on oeis.org
1, 1, 0, 1, 1, 0, 3, 0, 1, 0, 4, 2, 1, 1, 0, 7, 4, 4, 0, 1, 0, 14, 5, 6, 5, 1, 1, 0, 23, 14, 10, 10, 6, 0, 1, 0, 39, 26, 29, 12, 14, 6, 1, 1, 0, 71, 46, 54, 40, 19, 16, 9, 0, 1, 0, 124, 92, 96, 82, 64, 22, 22, 8, 1, 1, 0, 214, 176, 204, 144, 137, 82, 30, 26, 10, 0, 1, 0
Offset: 0
Triangle begins:
1
1 0
1 1 0
3 0 1 0
4 2 1 1 0
7 4 4 0 1 0
14 5 6 5 1 1 0
23 14 10 10 6 0 1 0
39 26 29 12 14 6 1 1 0
71 46 54 40 19 16 9 0 1 0
124 92 96 82 64 22 22 8 1 1 0
Row n = 6 counts the following compositions:
(6) (411) (3111) (33) (222) (111111) .
(51) (114) (1113) (2211)
(15) (1311) (1221) (1122)
(42) (1131) (12111) (21111)
(24) (2112) (11211) (11112)
(141) (11121)
(321)
(312)
(231)
(213)
(132)
(123)
(2121)
(1212)
For example, the composition (1,2,2,1) with compression (1,2,1) is counted under T(6,2).
Column k = 0 is
A003242 (anti-runs or compressed compositions).
Same as
A373949 with rows reversed.
A114901 counts compositions with no isolated parts.
A116861 counts partitions by compressed sum, by compressed length
A116608.
A240085 counts compositions with no unique parts.
A333755 counts compositions by compressed length.
A373948 represents the run-compression transformation.
Cf.
A037201 (halved
A373947),
A106356,
A124762,
A238130,
A238279,
A238343,
A285981,
A333213,
A333382,
A333489,
A373952.
-
Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n], Total[First/@Split[#]]==n-k&]],{n,0,10},{k,0,n}]
A374251
Irregular triangle read by rows where row n is the run-compression of the n-th composition in standard order.
Original entry on oeis.org
1, 2, 1, 3, 2, 1, 1, 2, 1, 4, 3, 1, 2, 2, 1, 1, 3, 1, 2, 1, 1, 2, 1, 5, 4, 1, 3, 2, 3, 1, 2, 3, 2, 1, 2, 1, 2, 2, 1, 1, 4, 1, 3, 1, 1, 2, 1, 2, 1, 1, 3, 1, 2, 1, 1, 2, 1, 6, 5, 1, 4, 2, 4, 1, 3, 3, 2, 1, 3, 1, 2, 3, 1, 2, 4, 2, 3, 1, 2, 2, 1, 2, 1, 3
Offset: 1
The standard compositions and their run-compressions begin:
0: () --> ()
1: (1) --> (1)
2: (2) --> (2)
3: (1,1) --> (1)
4: (3) --> (3)
5: (2,1) --> (2,1)
6: (1,2) --> (1,2)
7: (1,1,1) --> (1)
8: (4) --> (4)
9: (3,1) --> (3,1)
10: (2,2) --> (2)
11: (2,1,1) --> (2,1)
12: (1,3) --> (1,3)
13: (1,2,1) --> (1,2,1)
14: (1,1,2) --> (1,2)
15: (1,1,1,1) --> (1)
Row n has
A334028(n) distinct elements.
Rows are ranked by
A373948 (standard order).
A003242 counts run-compressed compositions, i.e., anti-runs, ranks
A333489.
A007947 (squarefree kernel) represents run-compression of multisets.
A066099 lists the parts of compositions in standard order.
A116861 counts partitions by sum of run-compression.
A373949 counts compositions by sum of run-compression, opposite
A373951.
Cf.
A000120,
A070939,
A106356,
A124762,
A233564,
A238130,
A238343,
A272919,
A333381,
A333382,
A333627,
A373954,
A374250.
-
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Table[First/@Split[stc[n]],{n,100}]
A374515
Irregular triangle read by rows where row n lists the leaders of anti-runs in the n-th composition in standard order.
Original entry on oeis.org
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
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)
Row-leaders of nonempty rows are
A065120.
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:
Six types of maximal runs:
-
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Table[First/@Split[stc[n],UnsameQ],{n,0,100}]
Showing 1-10 of 46 results.
Comments