A274174
Number of compositions of n if all summand runs are kept together.
Original entry on oeis.org
1, 1, 2, 4, 7, 12, 22, 36, 60, 97, 162, 254, 406, 628, 974, 1514, 2305, 3492, 5254, 7842, 11598, 17292, 25294, 37090, 53866, 78113, 112224, 161092, 230788, 328352, 466040, 658846, 928132, 1302290, 1821770, 2537156, 3536445, 4897310, 6777806, 9341456, 12858960, 17625970, 24133832, 32910898, 44813228, 60922160, 82569722
Offset: 0
If the summand runs are blocked together, there are 22 compositions of a(6): 6; 5+1, 1+5, 4+2, 2+4, (3+3), 4+(1+1), (1+1)+4, 1+2+3, 1+3+2, 2+1+3, 2+3+1, 3+1+2, 3+2+1, (2+2+2), 3+(1+1+1), (1+1+1)+3, (2+2)+(1+1), (1+1)+(2+2), 2+(1+1+1+1), (1+1+1+1)+2, (1+1+1+1+1+1).
a(0)=1; a(1)= 1; a(4) = 7; a(9) = 97; a(16) = 2305; a(25) = 78113 and a(36) = 3536445. - _Gregory L. Simay_, Jun 23 2019
The version for patterns is
A001339.
The version for prime indices is
A333175.
The complement (i.e., the matching version) is
A335548.
(1,2,1)- and (2,1,2)-matching permutations of prime indices are
A335462.
(1,2,1)-matching compositions are
A335470.
(1,2,1)-avoiding compositions are
A335471.
(2,1,2)-matching compositions are
A335472.
(2,1,2)-avoiding compositions are
A335473.
-
b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
add(b(n-i*j, i-1, p+`if`(j=0, 0, 1)), j=0..n/i)))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..50); # Alois P. Heinz, Jun 12 2016
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[Split[#]]==Length[Union[#]]&]],{n,0,10}] (* Gus Wiseman, Jul 07 2020 *)
b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i < 1, 0,
Sum[b[n - i*j, i - 1, p + If[j == 0, 0, 1]], {j, 0, n/i}]]];
a[n_] := b[n, n, 0];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 11 2021, after Alois P. Heinz *)
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}]
A374249
Numbers k such that the k-th composition in standard order has its equal parts contiguous.
Original entry on oeis.org
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 26, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 47, 48, 50, 52, 56, 58, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 78, 79, 80, 81, 83, 84, 85
Offset: 1
The terms together with their standard compositions begin:
0: ()
1: (1)
2: (2)
3: (1,1)
4: (3)
5: (2,1)
6: (1,2)
7: (1,1,1)
8: (4)
9: (3,1)
10: (2,2)
11: (2,1,1)
12: (1,3)
14: (1,1,2)
15: (1,1,1,1)
16: (5)
See A374253 for the complement: 13, 22, 25, 27, 29, ...
Compositions of this type are counted by
A274174.
Permutations of prime indices of this type are counted by
A333175.
A066099 lists compositions in standard order.
A333755 counts compositions by number of runs.
A335454 counts patterns matched by standard compositions.
A335462 counts (1,2,1)- and (2,1,2)-matching permutations of prime indices.
Cf.
A106356,
A124762,
A238130,
A238279,
A261982,
A272919,
A333382,
A335450,
A335460,
A335524,
A335525.
-
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Select[Range[0,100],UnsameQ@@First/@Split[stc[#]]&]
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
A374635
Number of integer compositions of n whose leaders of weakly increasing runs are themselves weakly increasing.
Original entry on oeis.org
1, 1, 2, 3, 6, 10, 20, 36, 69, 130, 247, 467, 890, 1689, 3213, 6110, 11627, 22121, 42101, 80124, 152512, 290300, 552609, 1051953, 2002583, 3812326, 7257679, 13816867, 26304254, 50077792, 95338234, 181505938, 345554234, 657874081, 1252478707, 2384507463, 4539705261
Offset: 0
The composition (1,3,3,2,4,2) has weakly increasing runs ((1,3,3),(2,4),(2)), with leaders (1,2,2), so is counted under a(15).
The a(0) = 1 through a(6) = 20 compositions:
() (1) (2) (3) (4) (5) (6)
(11) (12) (13) (14) (15)
(111) (22) (23) (24)
(112) (113) (33)
(121) (122) (114)
(1111) (131) (123)
(1112) (132)
(1121) (141)
(1211) (222)
(11111) (1113)
(1122)
(1131)
(1212)
(1221)
(1311)
(11112)
(11121)
(11211)
(12111)
(111111)
Ranked by positions of weakly increasing rows in
A374629 (sums
A374630).
Types of runs (instead of weakly increasing):
- For leaders of constant runs we have
A000041.
- For leaders of weakly decreasing runs we have
A188900.
- For leaders of anti-runs we have
A374681.
- For leaders of strictly increasing runs we have
A374690.
- For leaders of strictly decreasing runs we have
A374764.
Types of run-leaders (instead of weakly increasing):
- 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 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],LessEqual@@First/@Split[#,LessEqual]&]],{n,0,15}]
-
dfs(m, r, u) = 1 + sum(s=u, min(m, r-1), x^s/(1-x^s) + sum(t=s+1, m-s, dfs(m-s-t, t, s)*x^(s+t)/prod(i=s, t, 1-x^i)));
lista(nn) = Vec(dfs(nn, nn+1, 1) + O(x^(1+nn))); \\ Jinyuan Wang, Feb 13 2025
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}]
A374700
Triangle read by rows where T(n,k) is the number of integer compositions of n whose leaders of strictly increasing runs sum to k.
Original entry on oeis.org
1, 0, 1, 0, 0, 2, 0, 1, 0, 3, 0, 1, 2, 0, 5, 0, 1, 3, 5, 0, 7, 0, 2, 4, 6, 9, 0, 11, 0, 2, 7, 10, 13, 17, 0, 15, 0, 3, 8, 20, 23, 24, 28, 0, 22, 0, 3, 14, 26, 47, 47, 42, 47, 0, 30, 0, 5, 17, 45, 66, 101, 92, 71, 73, 0, 42, 0, 5, 27, 61, 124, 154, 201, 166, 116, 114, 0, 56
Offset: 0
Triangle begins:
1
0 1
0 0 2
0 1 0 3
0 1 2 0 5
0 1 3 5 0 7
0 2 4 6 9 0 11
0 2 7 10 13 17 0 15
0 3 8 20 23 24 28 0 22
0 3 14 26 47 47 42 47 0 30
0 5 17 45 66 101 92 71 73 0 42
0 5 27 61 124 154 201 166 116 114 0 56
0 7 33 101 181 300 327 379 291 182 170 0 77
0 8 48 138 307 467 668 656 680 488 282 253 0 101
Row n = 6 counts the following compositions:
. (15) (24) (231) (312) . (6)
(123) (141) (213) (2121) (51)
(114) (132) (2112) (42)
(1212) (1311) (1221) (411)
(1131) (1122) (33)
(1113) (12111) (321)
(11211) (3111)
(11121) (222)
(11112) (2211)
(21111)
(111111)
For length instead of sum we have
A333213.
Leaders of strictly increasing runs in standard compositions are
A374683.
The corresponding rank statistic is
A374684.
Other types of runs (instead of strictly increasing):
- For leaders of constant runs we have
A373949.
- For leaders of anti-runs we have
A374521.
- For leaders of weakly increasing runs we have
A374637.
- For leaders of weakly decreasing runs we have
A374748.
- For leaders of strictly decreasing runs we have
A374766.
A003242 counts anti-run compositions.
-
Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],Total[First/@Split[#,Less]]==k&]],{n,0,15},{k,0,n}]
A374634
Number of integer compositions of n whose leaders of weakly increasing runs are strictly increasing.
Original entry on oeis.org
1, 1, 2, 3, 5, 7, 12, 17, 28, 43, 67, 103, 162, 245, 374, 569, 854, 1278, 1902, 2816, 4148, 6087, 8881, 12926, 18726, 27042, 38894, 55789, 79733, 113632, 161426, 228696, 323049, 455135, 639479, 896249, 1252905, 1747327, 2431035, 3374603, 4673880, 6459435, 8908173
Offset: 0
The composition (1,3,3,2,4,3) has weakly increasing runs ((1,3,3),(2,4),(3)), with leaders (1,2,3), so is counted under a(16).
The a(0) = 1 through a(7) = 17 compositions:
() (1) (2) (3) (4) (5) (6) (7)
(11) (12) (13) (14) (15) (16)
(111) (22) (23) (24) (25)
(112) (113) (33) (34)
(1111) (122) (114) (115)
(1112) (123) (124)
(11111) (132) (133)
(222) (142)
(1113) (223)
(1122) (1114)
(11112) (1123)
(111111) (1132)
(1222)
(11113)
(11122)
(111112)
(1111111)
Ranked by positions of strictly increasing rows in
A374629 (sums
A374630).
Types of runs (instead of weakly increasing):
- For leaders of constant runs we have
A000041.
- For leaders of anti-runs we have
A374679.
- For leaders of strictly increasing runs we have
A374688.
- For leaders of strictly decreasing runs we have
A374762.
Types of run-leaders (instead of strictly increasing):
- 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.
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],Less@@First/@Split[#,LessEqual]&]],{n,0,15}]
-
dfs(m, r, u) = 1 + sum(s=u+1, min(m, r-1), x^s/(1-x^s) + sum(t=s+1, m-s, dfs(m-s-t, t, s)*x^(s+t)/prod(i=s, t, 1-x^i)));
lista(nn) = Vec(dfs(nn, nn+1, 0) + O(x^(1+nn))); \\ Jinyuan Wang, Feb 13 2025
A374687
Number of integer compositions of n whose leaders of strictly increasing runs are distinct.
Original entry on oeis.org
1, 1, 1, 3, 3, 7, 11, 15, 27, 45, 65, 101, 161, 251, 381, 573, 865, 1321, 1975, 2965, 4387, 6467, 9579, 14091, 20669, 30135, 43869, 63531, 91831, 132575, 190567, 273209, 390659, 557069, 792371, 1124381, 1591977, 2249029, 3169993, 4458163, 6256201, 8762251, 12246541
Offset: 0
The a(0) = 1 through a(7) = 15 compositions:
() (1) (2) (3) (4) (5) (6) (7)
(12) (13) (14) (15) (16)
(21) (31) (23) (24) (25)
(32) (42) (34)
(41) (51) (43)
(122) (123) (52)
(212) (132) (61)
(213) (124)
(231) (133)
(312) (142)
(321) (214)
(241)
(313)
(412)
(421)
Types of runs (instead of strictly increasing):
- For leaders of identical runs we have
A274174 for n > 0, ranks
A374249.
- For leaders of weakly increasing runs we have
A374632, ranks
A374768.
- For leaders of weakly decreasing runs we have
A374743, ranks
A374701.
- For leaders of strictly decreasing runs we have
A374761, ranks
A374767.
Types of run-leaders (instead of distinct):
- For strictly increasing leaders we have
A374688.
- For strictly decreasing leaders we have
A374689.
- For weakly increasing leaders we have
A374690.
- For weakly decreasing leaders we have
A374697.
A335456 counts patterns matched by compositions.
A374683 lists leaders of strictly increasing runs of standard compositions.
A374700 counts compositions by sum of leaders of strictly increasing runs.
-
Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],UnsameQ@@First/@Split[#,Less]&]],{n,0,15}]
-
dfs(m, r, v) = 1 + sum(s=1, min(m, r), if(!setsearch(v, s), dfs(m-s, s, setunion(v, [s]))*x^s + sum(t=s+1, m-s, dfs(m-s-t, t, setunion(v, [s]))*x^(s+t)*prod(i=s+1, t-1, 1+x^i))));
lista(nn) = Vec(dfs(nn, nn, []) + O(x^(1+nn))); \\ Jinyuan Wang, Feb 13 2025
Showing 1-10 of 29 results.
Comments