A038041
Number of ways to partition an n-set into subsets of equal size.
Original entry on oeis.org
1, 2, 2, 5, 2, 27, 2, 142, 282, 1073, 2, 32034, 2, 136853, 1527528, 4661087, 2, 227932993, 2, 3689854456, 36278688162, 13749663293, 2, 14084955889019, 5194672859378, 7905858780927, 2977584150505252, 13422745388226152, 2, 1349877580746537123, 2
Offset: 1
a(4) = card{ 1|2|3|4, 12|34, 14|23, 13|24, 1234 } = 5.
From _Gus Wiseman_, Jul 12 2019: (Start)
The a(6) = 27 set partitions:
{{1}{2}{3}{4}{5}{6}} {{12}{34}{56}} {{123}{456}} {{123456}}
{{12}{35}{46}} {{124}{356}}
{{12}{36}{45}} {{125}{346}}
{{13}{24}{56}} {{126}{345}}
{{13}{25}{46}} {{134}{256}}
{{13}{26}{45}} {{135}{246}}
{{14}{23}{56}} {{136}{245}}
{{14}{25}{36}} {{145}{236}}
{{14}{26}{35}} {{146}{235}}
{{15}{23}{46}} {{156}{234}}
{{15}{24}{36}}
{{15}{26}{34}}
{{16}{23}{45}}
{{16}{24}{35}}
{{16}{25}{34}}
(End)
-
A038041 := proc(n) local d;
add(n!/(d!*(n/d)!^d), d = numtheory[divisors](n)) end:
seq(A038041(n),n = 1..29); # Peter Luschny, Apr 16 2011
-
a[n_] := Block[{d = Divisors@ n}, Plus @@ (n!/(#! (n/#)!^#) & /@ d)]; Array[a, 29] (* Robert G. Wilson v, Apr 16 2011 *)
Table[Sum[n!/((n/d)!*(d!)^(n/d)), {d, Divisors[n]}], {n, 1, 31}] (* Emanuele Munarini, Jan 30 2014 *)
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
Table[Length[Select[sps[Range[n]],SameQ@@Length/@#&]],{n,0,8}] (* Gus Wiseman, Jul 12 2019 *)
-
a(n):= lsum(n!/((n/d)!*(d!)^(n/d)),d,listify(divisors(n)));
makelist(a(n),n,1,40); /* Emanuele Munarini, Feb 03 2014 */
-
/* compare to A061095 */
mnom(v)=
/* Multinomial coefficient s! / prod(j=1, n, v[j]!) where
s= sum(j=1, n, v[j]) and n is the number of elements in v[]. */
sum(j=1, #v, v[j])! / prod(j=1, #v, v[j]!)
A038041(n)={local(r=0);fordiv(n,d,r+=mnom(vector(d,j,n/d))/d!);return(r);}
vector(33,n,A038041(n)) /* Joerg Arndt, Apr 16 2011 */
-
import math
def a(n):
count = 0
for k in range(1, n + 1):
if n % k == 0:
count += math.factorial(n) // (math.factorial(k) ** (n // k) * math.factorial(n // k))
return count # Paul Muljadi, Sep 25 2024
A022915
Multinomial coefficients (0, 1, ..., n)! = C(n+1,2)!/(0!*1!*2!*...*n!).
Original entry on oeis.org
1, 1, 3, 60, 12600, 37837800, 2053230379200, 2431106898187968000, 73566121315513295589120000, 65191584694745586153436251091200000, 1906765806522767212441719098019963758016000000, 2048024348726152339387799085049745725891853852479488000000
Offset: 0
From _Gus Wiseman_, Aug 12 2020: (Start)
The a(3) = 60 permutations of the prime indices of A006939(3) = 360:
(111223) (121123) (131122) (212113) (231211)
(111232) (121132) (131212) (212131) (232111)
(111322) (121213) (131221) (212311) (311122)
(112123) (121231) (132112) (213112) (311212)
(112132) (121312) (132121) (213121) (311221)
(112213) (121321) (132211) (213211) (312112)
(112231) (122113) (211123) (221113) (312121)
(112312) (122131) (211132) (221131) (312211)
(112321) (122311) (211213) (221311) (321112)
(113122) (123112) (211231) (223111) (321121)
(113212) (123121) (211312) (231112) (321211)
(113221) (123211) (211321) (231121) (322111)
(End)
A190945 counts the case of anti-run permutations.
A317829 counts partitions of this multiset.
A325617 is the version for factorials instead of superprimorials.
A006939 lists superprimorials or Chernoff numbers.
A008480 counts permutations of prime indices.
-
with(combinat):
a:= n-> multinomial(binomial(n+1, 2), $0..n):
seq(a(n), n=0..12); # Alois P. Heinz, May 18 2013
-
Table[Apply[Multinomial ,Range[n]], {n, 0, 20}] (* Geoffrey Critzer, Dec 09 2012 *)
Table[Multinomial @@ Range[n], {n, 0, 20}] (* Eric W. Weisstein, Jul 14 2017 *)
Table[Binomial[n + 1, 2]!/BarnesG[n + 2], {n, 0, 20}] (* Eric W. Weisstein, Jul 14 2017 *)
Table[Length[Permutations[Join@@Table[i,{i,n},{i}]]],{n,0,4}] (* Gus Wiseman, Aug 12 2020 *)
-
a(n) = binomial(n+1,2)!/prod(k=1, n, k^(n+1-k)); \\ Michel Marcus, May 02 2019
More terms from Larry Reeves (larryr(AT)acm.org), Apr 11 2001
A218868
Triangular array read by rows: T(n,k) is the number of n-permutations that have exactly k distinct cycle lengths.
Original entry on oeis.org
1, 2, 3, 3, 10, 14, 25, 95, 176, 424, 120, 721, 3269, 1050, 6406, 21202, 12712, 42561, 178443, 141876, 436402, 1622798, 1418400, 151200, 3628801, 17064179, 17061660, 2162160, 48073796, 177093256, 212254548, 41580000, 479001601, 2293658861, 2735287698, 719072640
Offset: 1
: 1;
: 2;
: 3, 3;
: 10, 14;
: 25, 95;
: 176, 424, 120;
: 721, 3269, 1050;
: 6406, 21202, 12712;
: 42561, 178443, 141876;
: 436402, 1622798, 1418400, 151200;
-
with(combinat):
b:= proc(n, i) option remember; expand(`if`(n=0, 1,
`if`(i<1, 0, add((i-1)!^j*multinomial(n, n-i*j, i$j)/j!*
b(n-i*j, i-1)*`if`(j=0, 1, x), j=0..n/i))))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n$2)):
seq(T(n), n=1..16); # Alois P. Heinz, Aug 21 2014
-
nn=10;a=Product[1-y+y Exp[x^i/i],{i,1,nn}];f[list_]:=Select[list,#>0&];Map[f,Drop[Range[0,nn]!CoefficientList[Series[a ,{x,0,nn}],{x,y}],1]]//Grid
A088142
Number of partitions of n-set with 2 block sizes.
Original entry on oeis.org
3, 10, 50, 116, 560, 1730, 6123, 30122, 116908, 507277, 2492737, 15328119, 56182092, 441156796, 2093130576, 15965840718, 77353276330, 693400983344, 3517825829117, 35126205660152, 187347585491624, 1952969742765476
Offset: 3
-
with(numtheory): with(combinat):
a:= n-> add(add(add(multinomial(n, i$j, d$((n-i*j)/d))/j!/((n-i*j)/d)!,
d=select(x->xAlois P. Heinz, Feb 01 2014
-
max = 25; G[x_] = Sum[Exp[x^k/k!]-1, {k, 1, max}]; H[x_] = Sum[(Exp[x^k/k!]-1)^2, {k, 1, max}]; Drop[CoefficientList[(G[x]^2-H[x])/2 + O[x]^max, x]*Range[0, max-1]!, 3] (* Jean-François Alcover, Jul 01 2015 *)
A371788
Triangle read by rows where T(n,k) is the number of set partitions of {1..n} with exactly k distinct block-sums.
Original entry on oeis.org
1, 0, 1, 0, 1, 1, 0, 2, 2, 1, 0, 2, 8, 4, 1, 0, 2, 19, 24, 6, 1, 0, 2, 47, 95, 49, 9, 1, 0, 6, 105, 363, 297, 93, 12, 1, 0, 12, 248, 1292, 1660, 753, 158, 16, 1, 0, 11, 563, 4649, 8409, 5591, 1653, 250, 20, 1, 0, 2, 1414, 15976, 41264, 38074, 15590, 3249, 380, 25, 1
Offset: 0
The set partition {{1,3},{2},{4}} has two distinct block-sums {2,4} so is counted under T(4,2).
Triangle begins:
1
0 1
0 1 1
0 2 2 1
0 2 8 4 1
0 2 19 24 6 1
0 2 47 95 49 9 1
0 6 105 363 297 93 12 1
0 12 248 1292 1660 753 158 16 1
0 11 563 4649 8409 5591 1653 250 20 1
0 2 1414 15976 41264 38074 15590 3249 380 25 1
Row n = 4 counts the following set partitions:
. {{1,4},{2,3}} {{1},{2,3,4}} {{1},{2},{3,4}} {{1},{2},{3},{4}}
{{1,2,3,4}} {{1,2},{3},{4}} {{1},{2,3},{4}}
{{1,2},{3,4}} {{1},{2,4},{3}}
{{1,3},{2},{4}} {{1,4},{2},{3}}
{{1,3},{2,4}}
{{1,2,3},{4}}
{{1,2,4},{3}}
{{1,3,4},{2}}
A version for integer partitions is
A116608.
For block lengths instead of sums we have
A208437.
A008277 counts set partitions by length.
A275780 counts set partitions with distinct block-sums.
-
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]& /@ sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
Table[Length[Select[sps[Range[n]], Length[Union[Total/@#]]==k&]],{n,0,5},{k,0,n}]
A133118
Number of partitions of n-set with 3 block sizes.
Original entry on oeis.org
60, 315, 2268, 14742, 72180, 464640, 2676366, 16400098, 94209206, 673282610, 4095231104, 29371828846, 197547348216, 1513916607683, 10904464442572, 87070803499372, 673555061736062, 5718121102062336, 47028289679340734, 418812093667530755, 3680961843042545490, 34161428275433710485
Offset: 6
-
multinomial[n_, k_List] := n!/Times @@ (k!);
b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[multinomial[n, Prepend[Table[i, {j}], n - i*j]]/j!*b[n - i*j, i - 1]*If[j == 0, 1, x], {j, 0, n/i}]]];
a[n_] := Coefficient[b[n, n], x, 3];
Array[a, 22, 6] (* Jean-François Alcover, May 24 2019, after Alois P. Heinz in A208437 *)
Showing 1-6 of 6 results.
Comments