A238279
Triangle read by rows: T(n,k) is the number of compositions of n into nonzero parts with k parts directly followed by a different part, n>=0, 0<=k<=A004523(n-1).
Original entry on oeis.org
1, 1, 2, 2, 2, 3, 4, 1, 2, 10, 4, 4, 12, 14, 2, 2, 22, 29, 10, 1, 4, 26, 56, 36, 6, 3, 34, 100, 86, 31, 2, 4, 44, 148, 200, 99, 16, 1, 2, 54, 230, 374, 278, 78, 8, 6, 58, 322, 680, 654, 274, 52, 2, 2, 74, 446, 1122, 1390, 814, 225, 22, 1, 4, 88, 573, 1796, 2714, 2058, 813, 136, 10, 4, 88, 778, 2694, 4927
Offset: 0
Triangle starts:
00: 1;
01: 1;
02: 2;
03: 2, 2;
04: 3, 4, 1;
05: 2, 10, 4;
06: 4, 12, 14, 2;
07: 2, 22, 29, 10, 1;
08: 4, 26, 56, 36, 6;
09: 3, 34, 100, 86, 31, 2;
10: 4, 44, 148, 200, 99, 16, 1;
11: 2, 54, 230, 374, 278, 78, 8;
12: 6, 58, 322, 680, 654, 274, 52, 2;
13: 2, 74, 446, 1122, 1390, 814, 225, 22, 1;
14: 4, 88, 573, 1796, 2714, 2058, 813, 136, 10;
15: 4, 88, 778, 2694, 4927, 4752, 2444, 618, 77, 2;
16: 5, 110, 953, 3954, 8531, 9930, 6563, 2278, 415, 28, 1;
...
Row n=5 is 2, 10, 4 because in the 16 compositions of 5
##: [composition] no. of changes
01: [ 1 1 1 1 1 ] 0
02: [ 1 1 1 2 ] 1
03: [ 1 1 2 1 ] 2
04: [ 1 1 3 ] 1
05: [ 1 2 1 1 ] 2
06: [ 1 2 2 ] 1
07: [ 1 3 1 ] 2
08: [ 1 4 ] 1
09: [ 2 1 1 1 ] 1
10: [ 2 1 2 ] 2
11: [ 2 2 1 ] 1
12: [ 2 3 ] 1
13: [ 3 1 1 ] 1
14: [ 3 2 ] 1
15: [ 4 1 ] 1
16: [ 5 ] 0
there are 2 with no changes, 10 with one change, and 4 with two changes.
Columns k=0-10 give:
A000005 (for n>0), 2*
A002133,
A244714,
A244715,
A244716,
A244717,
A244718,
A244719,
A244720,
A244721,
A244722.
The version counting adjacent equal parts is
A106356.
The version for ascents/descents is
A238343.
The version for weak ascents/descents is
A333213.
The k-th composition in standard-order has
A124762(k) adjacent equal parts,
A124767(k) maximal runs,
A333382(k) adjacent unequal parts, and
A333381(k) maximal anti-runs.
-
b:= proc(n, v) option remember; `if`(n=0, 1, expand(
add(b(n-i, i)*`if`(v=0 or v=i, 1, x), i=1..n)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)):
seq(T(n), n=0..14);
-
b[n_, v_] := b[n, v] = If[n == 0, 1, Expand[Sum[b[n-i, i]*If[v == 0 || v == i, 1, x], {i, 1, n}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 0]]; Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Feb 11 2015, after Maple *)
Table[If[n==0,1,Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[Split[#]]==k+1&]]],{n,0,12},{k,0,If[n==0,0,Floor[2*(n-1)/3]]}] (* Gus Wiseman, Apr 10 2020 *)
-
T_xy(max_row) = {my(N=max_row+1, x='x+O('x^N),h=(1+ sum(i=1,N,(x^i-y*x^i)/(1+y*x^i-x^i)))/(1-sum(i=1,N, y*x^i/(1+y*x^i-x^i)))); for(n=0,N-1, print(Vecrev(polcoeff(h,n))))}
T_xy(16) \\ John Tyler Rascoe, Jul 10 2024
A333489
Numbers k such that the k-th composition in standard order is an anti-run (no adjacent equal parts).
Original entry on oeis.org
0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 16, 17, 18, 20, 22, 24, 25, 32, 33, 34, 37, 38, 40, 41, 44, 45, 48, 49, 50, 52, 54, 64, 65, 66, 68, 69, 70, 72, 76, 77, 80, 81, 82, 88, 89, 96, 97, 98, 101, 102, 104, 105, 108, 109, 128, 129, 130, 132, 133, 134, 137, 140, 141
Offset: 1
The sequence together with the corresponding compositions begins:
0: () 33: (5,1) 70: (4,1,2)
1: (1) 34: (4,2) 72: (3,4)
2: (2) 37: (3,2,1) 76: (3,1,3)
4: (3) 38: (3,1,2) 77: (3,1,2,1)
5: (2,1) 40: (2,4) 80: (2,5)
6: (1,2) 41: (2,3,1) 81: (2,4,1)
8: (4) 44: (2,1,3) 82: (2,3,2)
9: (3,1) 45: (2,1,2,1) 88: (2,1,4)
12: (1,3) 48: (1,5) 89: (2,1,3,1)
13: (1,2,1) 49: (1,4,1) 96: (1,6)
16: (5) 50: (1,3,2) 97: (1,5,1)
17: (4,1) 52: (1,2,3) 98: (1,4,2)
18: (3,2) 54: (1,2,1,2) 101: (1,3,2,1)
20: (2,3) 64: (7) 102: (1,3,1,2)
22: (2,1,2) 65: (6,1) 104: (1,2,4)
24: (1,4) 66: (5,2) 105: (1,2,3,1)
25: (1,3,1) 68: (4,3) 108: (1,2,1,3)
32: (6) 69: (4,2,1) 109: (1,2,1,2,1)
Anti-runs summing to n are counted by
A003242(n).
A triangle counting maximal anti-runs of compositions is
A106356.
A triangle counting maximal runs of compositions is
A238279 or
A238130.
Partitions whose first differences are an anti-run are
A238424.
All of the following pertain to compositions in standard order (
A066099):
- Adjacent equal pairs are counted by
A124762.
- Weakly decreasing runs are counted by
A124765.
- Weakly increasing runs are counted by
A124766.
- Equal runs are counted by
A124767.
- Strictly increasing runs are counted by
A124768.
- Strictly decreasing runs are counted by
A124769.
- Strict compositions are ranked by
A233564.
- Constant compositions are ranked by
A272919.
- Normal compositions are ranked by
A333217.
- Anti-runs are counted by
A333381.
- Adjacent unequal pairs are counted by
A333382.
-
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Select[Range[0,100],!MatchQ[stc[#],{_,x_,x_,_}]&]
A333755
Triangle read by rows where T(n,k) is the number of compositions of n with k runs, n >= 0, 0 <= k <= n.
Original entry on oeis.org
1, 0, 1, 0, 2, 0, 0, 2, 2, 0, 0, 3, 4, 1, 0, 0, 2, 10, 4, 0, 0, 0, 4, 12, 14, 2, 0, 0, 0, 2, 22, 29, 10, 1, 0, 0, 0, 4, 26, 56, 36, 6, 0, 0, 0, 0, 3, 34, 100, 86, 31, 2, 0, 0, 0, 0, 4, 44, 148, 200, 99, 16, 1, 0, 0, 0, 0, 2, 54, 230, 374, 278, 78, 8, 0, 0, 0, 0
Offset: 0
Triangle begins:
1
0 1
0 2 0
0 2 2 0
0 3 4 1 0
0 2 10 4 0 0
0 4 12 14 2 0 0
0 2 22 29 10 1 0 0
0 4 26 56 36 6 0 0 0
0 3 34 100 86 31 2 0 0 0
0 4 44 148 200 99 16 1 0 0 0
0 2 54 230 374 278 78 8 0 0 0 0
Row n = 6 counts the following compositions (empty column indicated by dot):
. (6) (15) (123) (1212)
(33) (24) (132) (2121)
(222) (42) (141)
(111111) (51) (213)
(114) (231)
(411) (312)
(1113) (321)
(1122) (1131)
(2211) (1221)
(3111) (1311)
(11112) (2112)
(21111) (11121)
(11211)
(12111)
The version for anti-runs is
A106356.
The k-th composition in standard-order has
A124767(k) runs.
The version counting descents is
A238343.
The version counting weak ascents is
A333213.
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[Split[#]]==k&]],{n,0,10},{k,0,n}]
A351293
Number of non-Look-and-Say partitions of n. Number of integer partitions of n such that there is no way to choose a disjoint strict integer partition of each multiplicity.
Original entry on oeis.org
0, 0, 0, 1, 1, 2, 4, 5, 9, 14, 21, 28, 44, 56, 80, 111, 148, 192, 264, 335, 447, 575, 743, 937, 1213, 1513, 1924, 2396, 3011, 3715, 4646, 5687, 7040, 8600, 10556, 12804, 15650, 18897, 22930, 27593, 33296, 39884, 47921, 57168, 68360, 81295, 96807, 114685
Offset: 0
The a(3) = 1 through a(9) = 14 partitions:
(21) (31) (32) (42) (43) (53) (54)
(41) (51) (52) (62) (63)
(321) (61) (71) (72)
(2211) (421) (431) (81)
(3211) (521) (432)
(3221) (531)
(3311) (621)
(4211) (3321)
(32111) (4221)
(4311)
(5211)
(32211)
(42111)
(321111)
These are all non-Wilf partitions (counted by
A336866, ranked by
A130092).
These partitions appear to be ranked by
A351295.
Non-Wilf partitions in the complement are counted by
A351592.
A032020 = number of binary expansions with all distinct run-lengths.
A044813 = numbers whose binary expansion has all distinct run-lengths.
A098859 = Wilf partitions (distinct multiplicities), ranked by
A130091.
A181819 = Heinz number of the prime signature of n (prime shadow).
A329738 = compositions with all equal run-lengths.
A329739 = compositions with all distinct run-lengths, for all runs
A351013.
A351017 = binary words with all distinct run-lengths, for all runs
A351016.
A351292 = patterns with all distinct run-lengths, for all runs
A351200.
Cf.
A000041,
A008284,
A047966,
A182857,
A225485,
A238130,
A297770,
A304660,
A305563,
A329740,
A329746,
A351202,
A351291.
-
disjointFamilies[y_]:=Select[Tuples[IntegerPartitions/@Length/@Split[y]],UnsameQ@@Join@@#&];
Table[Length[Select[IntegerPartitions[n],Length[disjointFamilies[#]]==0&]],{n,0,15}] (* Gus Wiseman, Aug 13 2025 *)
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}]
A329739
Number of compositions of n whose run-lengths are all different.
Original entry on oeis.org
1, 1, 2, 2, 5, 8, 10, 20, 28, 41, 62, 102, 124, 208, 278, 426, 571, 872, 1158, 1718, 2306, 3304, 4402, 6286, 8446, 11725, 15644, 21642, 28636, 38956, 52296, 70106, 93224, 124758, 165266, 218916, 290583, 381706, 503174, 659160, 865020, 1124458, 1473912, 1907298
Offset: 0
The a(1) = 1 through a(7) = 20 compositions:
(1) (2) (3) (4) (5) (6) (7)
(11) (111) (22) (113) (33) (115)
(112) (122) (114) (133)
(211) (221) (222) (223)
(1111) (311) (411) (322)
(1112) (1113) (331)
(2111) (3111) (511)
(11111) (11112) (1114)
(21111) (1222)
(111111) (2221)
(4111)
(11113)
(11122)
(22111)
(31111)
(111112)
(111211)
(112111)
(211111)
(1111111)
Compositions with relatively prime run-lengths are
A000740.
Compositions with distinct multiplicities are
A242882.
Compositions with distinct differences are
A325545.
Compositions with equal run-lengths are
A329738.
Compositions with normal run-lengths are
A329766.
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@Length/@Split[#]&]],{n,0,10}]
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
A329738
Number of compositions of n whose run-lengths are all equal.
Original entry on oeis.org
1, 1, 2, 4, 6, 8, 19, 24, 45, 75, 133, 215, 401, 662, 1177, 2035, 3587, 6190, 10933, 18979, 33339, 58157, 101958, 178046, 312088, 545478, 955321, 1670994, 2925717, 5118560, 8960946, 15680074, 27447350, 48033502, 84076143, 147142496, 257546243, 450748484, 788937192
Offset: 0
The a(1) = 1 through a(6) = 19 compositions:
(1) (2) (3) (4) (5) (6)
(11) (12) (13) (14) (15)
(21) (22) (23) (24)
(111) (31) (32) (33)
(121) (41) (42)
(1111) (131) (51)
(212) (123)
(11111) (132)
(141)
(213)
(222)
(231)
(312)
(321)
(1122)
(1212)
(2121)
(2211)
(111111)
Compositions with relatively prime run-lengths are
A000740.
Compositions with equal multiplicities are
A098504.
Compositions with equal differences are
A175342.
Compositions with distinct run-lengths are
A329739.
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],SameQ@@Length/@Split[#]&]],{n,0,10}]
-
seq(n)={my(b=Vec(1/(1 - sum(k=1, n, x^k/(1+x^k) + O(x*x^n)))-1)); concat([1], vector(n, k, sumdiv(k, d, b[d])))} \\ Andrew Howroyd, Dec 30 2020
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[#]]&]
A189076
Number of compositions of n that avoid the pattern 23-1.
Original entry on oeis.org
1, 1, 2, 4, 8, 16, 31, 61, 118, 228, 440, 846, 1623, 3111, 5955, 11385, 21752, 41530, 79250, 151161, 288224, 549408, 1047034, 1995000, 3800662, 7239710, 13789219, 26261678, 50012275, 95237360, 181350695, 345315255, 657506300, 1251912618, 2383636280, 4538364446
Offset: 0
From _Gus Wiseman_, Aug 19 2024: (Start)
The a(6) = 31 compositions:
. (6) (5,1) (4,1,1) (3,1,1,1) (2,1,1,1,1) (1,1,1,1,1,1)
(1,5) (1,4,1) (1,3,1,1) (1,2,1,1,1)
(4,2) (1,1,4) (1,1,3,1) (1,1,2,1,1)
(2,4) (3,2,1) (1,1,1,3) (1,1,1,2,1)
(3,3) (3,1,2) (2,2,1,1) (1,1,1,1,2)
(2,3,1) (2,1,2,1)
(2,1,3) (2,1,1,2)
(1,2,3) (1,2,2,1)
(2,2,2) (1,2,1,2)
(1,1,2,2)
Missing is (1,3,2), reverse of (2,3,1).
(End)
Avoiding 12-1 also gives
A188920 in reverse.
-
A189075 := proc(n) local g,i; g := 1; for i from 1 to n do 1-x^i/mul ( 1-x^j,j=i+1..n-i) ; g := g*% ; end do: g := expand(1/g) ; g := taylor(g,x=0,n+1) ; coeftayl(g,x=0,n) ; end proc: # R. J. Mathar, Apr 16 2011
-
a[n_] := Module[{g = 1, xi}, Do[xi = 1 - x^i/Product[1 - x^j, {j, i+1, n-i}]; g = g xi, {i, n}]; SeriesCoefficient[1/g, {x, 0, n}]];
a /@ Range[0, 32] (* Jean-François Alcover, Apr 02 2020, after R. J. Mathar *)
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MatchQ[#,{_,y_,z_,_,x_,_}/;xGus Wiseman, Aug 19 2024 *)
Showing 1-10 of 113 results.
Comments