A383098
Number of integer partitions of n having at least one permutation with all equal run-sums.
Original entry on oeis.org
1, 1, 2, 2, 4, 2, 7, 2, 7, 5, 7, 2, 19, 2, 7, 8, 14, 2, 27, 2, 24, 8, 7, 2, 58, 5, 7, 13, 30, 2, 72, 2, 38, 8, 7, 8, 135, 2, 7, 8, 91, 2, 112, 2, 45, 38, 7, 2, 258, 5, 51, 8, 54, 2, 208, 8, 143, 8, 7, 2, 525, 2, 7, 44, 153, 8, 256, 2, 75, 8, 136, 2, 891, 2, 7, 57, 87, 8
Offset: 0
The partition (4,4,4,2,2,1,1,1,1) has permutations (4,2,2,4,1,1,1,1,4) and (4,1,1,1,1,4,2,2,4) so is counted under a(20).
The a(1) = 1 through a(10) = 7 partitions (A=10):
1 2 3 4 5 6 7 8 9 A
11 111 22 11111 33 1111111 44 333 55
211 222 422 33111 22222
1111 2211 2222 3111111 511111
3111 41111 111111111 2221111
21111 221111 22111111
111111 11111111 1111111111
For distinct instead of equal run-sums we appear to have
A382427.
For run-lengths instead of sums we have
A383013, ranked by complement of
A382879.
These partitions are ranked by
A383110.
Counting and ranking partitions by run-lengths and run-sums:
Cf.
A006171,
A329738,
A353832,
A353839,
A353850,
A353932,
A354584,
A382076,
A382857,
A382876,
A383094,
A383112.
-
Table[Length[Select[IntegerPartitions[n],Select[Permutations[#],SameQ@@Total/@Split[#]&]!={}&]],{n,0,15}]
A383094
Number of integer partitions of n having exactly one permutation with all equal run-lengths.
Original entry on oeis.org
1, 1, 2, 2, 4, 4, 5, 6, 9, 7, 11, 10, 13, 12, 17, 14, 21, 16, 21, 18, 27, 22, 29, 22, 34, 25, 35, 28, 41, 28, 43, 30, 48, 38, 47, 38, 55, 36, 53, 46, 64, 40, 67, 42, 69, 54, 65, 46, 84, 51, 75, 62, 83, 52, 86, 62, 94, 70, 83, 58, 111, 60, 89, 80, 106, 74, 115, 66, 111
Offset: 0
The partition (222211) has exactly one permutation with all equal run-lengths: (221122), so is counted under a(10).
The a(1) = 1 through a(8) = 9 partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (111) (22) (221) (33) (322) (44)
(211) (311) (222) (331) (332)
(1111) (11111) (411) (511) (422)
(111111) (22111) (611)
(1111111) (2222)
(22211)
(221111)
(11111111)
Partitions of this type are ranked by
A383112 = positions of 1 in
A382857.
-
Table[Length[Select[IntegerPartitions[n], Length[Select[Permutations[#], SameQ@@Length/@Split[#]&]]==1&]],{n,0,20}]
A383096
Number of integer partitions of n having no permutation with all equal run-sums.
Original entry on oeis.org
0, 0, 0, 1, 1, 5, 4, 13, 15, 25, 35, 54, 58, 99, 128, 168, 217, 295, 358, 488, 603, 784, 995, 1253, 1517, 1953, 2429, 2997, 3688, 4563, 5532, 6840, 8311, 10135, 12303, 14875, 17842, 21635, 26008, 31177, 37247, 44581, 53062, 63259, 75130, 89096, 105551, 124752, 147015, 173520
Offset: 0
The a(3) = 1 through a(8) = 15 partitions:
(21) (31) (32) (42) (43) (53)
(41) (51) (52) (62)
(221) (321) (61) (71)
(311) (411) (322) (332)
(2111) (331) (431)
(421) (521)
(511) (611)
(2221) (3221)
(3211) (3311)
(4111) (4211)
(22111) (5111)
(31111) (22211)
(211111) (32111)
(311111)
(2111111)
For distinct instead of equal run-sums we appear to have
A381717, q.v.
Counting and ranking partitions by run-lengths and run-sums:
A382876 counts permutations of prime indices with distinct run-sums, zeros
A381636.
A383095 counts partitions having a unique permutation with equal run-sums, ranks
A383099.
-
Table[Length[Select[IntegerPartitions[n],Length[Select[Permutations[#],SameQ@@Total/@Split[#]&]]==0&]],{n,0,15}]
A383090
Number of integer partitions of n having more than one permutation with all equal run-lengths.
Original entry on oeis.org
0, 0, 0, 1, 1, 2, 4, 5, 9, 14, 20, 28, 43, 55, 77, 107, 141, 183, 244, 312, 411, 521, 664, 837, 1069, 1328, 1667, 2069, 2578, 3166, 3929, 4791, 5895, 7168, 8749, 10594, 12883, 15500, 18741, 22493, 27069, 32334, 38760, 46133, 55065, 65367, 77686, 91905, 108927, 128431, 151674
Offset: 0
The partition (3322221) has 3 permutations with all equal run-lengths: (2323212), (2321232), (2123232), so is counted under a(15).
The partition (3322111111) has 2 permutations with all equal run-lengths: (1133112211), (1122113311), so is counted under a(16).
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)
(222111)
Partitions of this type are ranked by
A383089 = positions of terms > 1 in
A382857.
For distinct instead of equal run-lengths we have
A383111, ranks
A383113.
-
Table[Length[Select[IntegerPartitions[n], Length[Select[Permutations[#], SameQ@@Length/@Split[#]&]]>1&]],{n,0,15}]
A133121
Triangle T(n,k) read by rows = number of partitions of n such that number of parts minus number of distinct parts is equal to k, k = 0..n-1.
Original entry on oeis.org
1, 1, 1, 2, 0, 1, 2, 2, 0, 1, 3, 2, 1, 0, 1, 4, 2, 3, 1, 0, 1, 5, 4, 2, 2, 1, 0, 1, 6, 6, 3, 3, 2, 1, 0, 1, 8, 7, 5, 4, 2, 2, 1, 0, 1, 10, 8, 10, 3, 5, 2, 2, 1, 0, 1, 12, 13, 8, 9, 4, 4, 2, 2, 1, 0, 1, 15, 15, 14, 10, 8, 5, 4, 2, 2, 1, 0, 1, 18, 21, 15, 16, 8, 9, 4, 4, 2, 2, 1, 0, 1, 22, 25, 23, 17, 17, 7, 10, 4, 4, 2, 2, 1, 0, 1
Offset: 1
1
1,1
2,0,1
2,2,0,1
3,2,1,0,1
4,2,3,1,0,1
5,4,2,2,1,0,1
6,6,3,3,2,1,0,1
8,7,5,4,2,2,1,0,1
10,8,10,3,5,2,2,1,0,1
12,13,8,9,4,4,2,2,1,0,1
15,15,14,10,8,5,4,2,2,1,0,1
18,21,15,16,8,9,4,4,2,2,1,0,1
From _Gus Wiseman_, Jan 23 2019: (Start)
It is possible to augment the triangle to cover the n = 0 and k = n cases, giving:
1
1 0
1 1 0
2 0 1 0
2 2 0 1 0
3 2 1 0 1 0
4 2 3 1 0 1 0
5 4 2 2 1 0 1 0
6 6 3 3 2 1 0 1 0
8 7 5 4 2 2 1 0 1 0
10 8 10 3 5 2 2 1 0 1 0
12 13 8 9 4 4 2 2 1 0 1 0
15 15 14 10 8 5 4 2 2 1 0 1 0
18 21 15 16 8 9 4 4 2 2 1 0 1 0
22 25 23 17 17 7 10 4 4 2 2 1 0 1 0
27 30 32 21 19 16 8 9 4 4 2 2 1 0 1 0
Row seven {5, 4, 2, 2, 1, 0, 1, 0} counts the following integer partitions (empty columns not shown).
(7) (322) (2221) (22111) (211111) (1111111)
(43) (331) (4111) (31111)
(52) (511)
(61) (3211)
(421)
(End)
Row sums are
A000041. Row polynomials evaluated at -1 are
A268498. Row polynomials evaluated at 2 are
A006951.
-
b:= proc(n, i) option remember; expand(`if`(n=0, 1, `if`(i<1, 0,
add(x^`if`(j=0, 0, j-1)*b(n-i*j, i-1), j=0..n/i))))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..n-1))(b(n$2)):
seq(T(n), n=1..16); # Alois P. Heinz, Aug 21 2015
-
b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i < 1, 0, Sum[x^If[j == 0, 0, j-1]*b[n - i*j, i - 1], {j, 0, n/i}]]]]; T[n_] := Function [p, Table[ Coefficient[p, x, i], {i, 0, n - 1}]][b[n, n]]; Table[T[n], {n, 1, 16}] // Flatten (* Jean-François Alcover, Jan 23 2016, after Alois P. Heinz *)
Table[Length[Select[IntegerPartitions[n],Length[#]-Length[Union[#]]==k&]],{n,0,15},{k,0,n}] (* augmented version, Gus Wiseman, Jan 23 2019 *)
-
partitm(n,m,nmin)={ local(resul,partj) ; if( n < 0 || m <0, return([;]) ; ) ; resul=matrix(0,m); if(m==0, return(resul); ) ; for(j=max(1,nmin),n\m, partj=partitm(n-j,m-1,j) ; for(r1=1,matsize(partj)[1], resul=concat(resul,concat([j],partj[r1,])) ; ) ; ) ; if(m==1 && n >= nmin, resul=concat(resul,[[n]]) ; ) ; return(resul) ; }
partit(n)={ local(resul,partm,filr) ; if( n < 0, return([;]) ; ) ; resul=matrix(0,n) ; for(m=1,n, partm=partitm(n,m,1) ; filr=vector(n-m) ; for(r1=1,matsize(partm)[1], resul=concat( resul,concat(partm[r1,],filr) ) ; ) ; ) ; return(resul) ; }
A133121row(n)={ local(p=partit(n),resul=vector(n),nprts,ndprts) ; for(r=1,matsize(p)[1], nprts=0 ; ndprts=0 ; for(c=1,n, if( p[r,c]==0, break, nprts++ ; if(c==1, ndprts++, if(p[r,c]!=p[r,c-1], ndprts++ ) ; ) ; ) ; ) ; k=nprts-ndprts; resul[k+1]++ ; ) ; return(resul) ; }
A133121()={ for(n=1,20, arow=A133121row(n) ; for(k=1,n, print1(arow[k],",") ; ) ; ) ; }
A133121() ; \\ R. J. Mathar, Sep 28 2007
-
tabl(nn) = my(pl = prod(n=1, nn, 1+x^n/(1-y*x^n)) + O(x^nn)); for (k=1, nn-1, print(Vecrev(polcoeff(pl,k,x)))); \\ Michel Marcus, Aug 23 2015
A333191
Number of compositions of n whose run-lengths are either strictly increasing or strictly decreasing.
Original entry on oeis.org
1, 1, 2, 2, 5, 8, 10, 18, 24, 29, 44, 60, 68, 100, 130, 148, 201, 256, 310, 396, 478, 582, 736, 898, 1068, 1301, 1594, 1902, 2288, 2750, 3262, 3910, 4638, 5510, 6538, 7686, 9069, 10670, 12560, 14728, 17170, 20090, 23462, 27292, 31710, 36878, 42704, 49430
Offset: 0
The a(1) = 1 through a(7) = 18 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)
(211111)
(1111111)
Partitions with distinct run-lengths are
A098859.
Partitions with strictly increasing run-lengths are
A100471.
Partitions with strictly decreasing run-lengths are
A100881.
Partitions with weakly decreasing run-lengths are
A100882.
Partitions with weakly increasing run-lengths are
A100883.
Compositions with equal run-lengths are
A329738.
Compositions whose run-lengths are unimodal are
A332726.
Compositions whose run-lengths are unimodal or co-unimodal are
A332746.
Compositions whose run-lengths are neither incr. nor decr. are
A332833.
Compositions that are neither increasing nor decreasing are
A332834.
Compositions with weakly increasing run-lengths are
A332836.
Compositions that are strictly incr. or strictly decr. are
A333147.
Compositions with strictly increasing run-lengths are
A333192.
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Or[Less@@Length/@Split[#],Greater@@Length/@Split[#]]&]],{n,0,15}]
A383092
Number of integer partitions of n having at most one permutation with all equal run-lengths.
Original entry on oeis.org
1, 1, 2, 2, 4, 5, 7, 10, 13, 16, 22, 28, 34, 46, 58, 69, 90, 114, 141, 178, 216, 271, 338, 418, 506, 630, 769, 941, 1140, 1399, 1675, 2051, 2454, 2975, 3561, 4289, 5094, 6137, 7274, 8692, 10269, 12249, 14414, 17128, 20110, 23767, 27872, 32849, 38346, 45094, 52552, 61533
Offset: 0
The partition (222211) has 1 permutation with all equal run-lengths: (221122), so is counted under a(10).
The partition (33211111) has no permutation with all equal run-lengths, so is counted under a(13).
The a(1) = 1 through a(7) = 10 partitions:
(1) (2) (3) (4) (5) (6) (7)
(11) (111) (22) (221) (33) (322)
(211) (311) (222) (331)
(1111) (2111) (411) (511)
(11111) (3111) (2221)
(21111) (4111)
(111111) (22111)
(31111)
(211111)
(1111111)
Partitions of this type are ranked by
A383091 = positions of terms <= 1 in
A382857.
-
Table[Length[Select[IntegerPartitions[n],Length[Select[Permutations[#],SameQ@@Length/@Split[#]&]]<=1&]],{n,0,15}]
A268498
Expansion of Product_{k>=1} ((1 + 2*x^k) / (1 + x^k)).
Original entry on oeis.org
1, 1, 0, 3, -1, 3, 3, 3, 0, 4, 12, 0, 9, -3, 21, 12, 17, -3, 33, 0, 33, 36, 36, 27, 21, 52, 24, 90, 72, 99, 24, 138, 21, 207, 0, 261, 149, 267, 45, 333, 174, 339, 174, 345, 411, 654, 330, 456, 657, 535, 684, 483, 1233, 489, 1353, 882, 1803, 720, 1902, 756
Offset: 0
-
nmax = 100; CoefficientList[Series[Product[(1+2*x^k)/(1+x^k), {k, 1, nmax}], {x, 0, nmax}], x]
A333190
Number of integer partitions of n whose run-lengths are either strictly increasing or strictly decreasing.
Original entry on oeis.org
1, 1, 2, 2, 4, 5, 7, 10, 13, 15, 21, 26, 29, 39, 49, 50, 68, 80, 92, 109, 129, 142, 181, 201, 227, 262, 317, 343, 404, 456, 516, 589, 677, 742, 870, 949, 1077, 1207, 1385, 1510, 1704, 1895, 2123, 2352, 2649, 2877, 3261, 3571, 3966, 4363, 4873, 5300, 5914, 6466
Offset: 0
The a(1) = 1 through a(8) = 13 partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (111) (22) (221) (33) (322) (44)
(211) (311) (222) (331) (332)
(1111) (2111) (411) (511) (422)
(11111) (3111) (2221) (611)
(21111) (4111) (2222)
(111111) (22111) (5111)
(31111) (22211)
(211111) (41111)
(1111111) (221111)
(311111)
(2111111)
(11111111)
The generalization to compositions is
A333191.
Partitions with distinct run-lengths are
A098859.
Partitions with strictly increasing run-lengths are
A100471.
Partitions with strictly decreasing run-lengths are
A100881.
Partitions with weakly decreasing run-lengths are
A100882.
Partitions with weakly increasing run-lengths are
A100883.
Partitions with unimodal run-lengths are
A332280.
Partitions whose run-lengths are not increasing nor decreasing are
A332641.
Compositions whose run-lengths are unimodal or co-unimodal are
A332746.
Compositions that are neither increasing nor decreasing are
A332834.
Strictly increasing or strictly decreasing compositions are
A333147.
Compositions with strictly increasing run-lengths are
A333192.
Numbers with strictly increasing prime multiplicities are
A334965.
-
Table[Length[Select[IntegerPartitions[n],Or[Less@@Length/@Split[#],Greater@@Length/@Split[#]]&]],{n,0,30}]
A333192
Number of compositions of n with strictly increasing run-lengths.
Original entry on oeis.org
1, 1, 2, 2, 4, 5, 7, 10, 14, 16, 24, 31, 37, 51, 67, 76, 103, 129, 158, 199, 242, 293, 370, 450, 538, 652, 799, 953, 1147, 1376, 1635, 1956, 2322, 2757, 3271, 3845, 4539, 5336, 6282, 7366, 8589, 10046, 11735, 13647, 15858, 18442, 21354, 24716, 28630, 32985
Offset: 0
The a(1) = 1 through a(8) = 14 compositions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (111) (22) (122) (33) (133) (44)
(211) (311) (222) (322) (233)
(1111) (2111) (411) (511) (422)
(11111) (3111) (1222) (611)
(21111) (4111) (2222)
(111111) (22111) (5111)
(31111) (11222)
(211111) (41111)
(1111111) (122111)
(221111)
(311111)
(2111111)
(11111111)
For example, the composition (1,2,2,1,1,1) has run-lengths (1,2,3), so is counted under a(8).
Strictly increasing compositions are
A000009.
Partitions with strictly increasing run-lengths are
A100471.
Partitions with strictly decreasing run-lengths are
A100881.
Compositions with equal run-lengths are
A329738.
Compositions whose run-lengths are unimodal are
A332726.
Compositions with strictly increasing or decreasing run-lengths are
A333191.
Numbers with strictly increasing prime multiplicities are
A334965.
Cf.
A072706,
A098859,
A100882,
A100883,
A304686,
A329744,
A329766,
A332726,
A332833,
A332834,
A332835,
A333147,
A333149,
A333190.
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Less@@Length/@Split[#]&]],{n,0,15}]
b[n_, lst_, v_] := b[n, lst, v] = If[n == 0, 1, If[n <= lst, 0, Sum[If[k == v, 0, b[n - k pz, pz, k]], {pz, lst + 1, n}, {k, Floor[n/pz]}]]]; a[n_] := b[n, 0, 0]; a /@ Range[0, 50] (* Giovanni Resta, May 18 2020 *)
Comments