A229228 Number of set partitions of {1,...,2n} into sets of size at most n.
1, 1, 10, 166, 3795, 112124, 4163743, 190168577, 10468226150, 681863474058, 51720008131148, 4506628734688128, 445956917001833090, 49631199898024188422, 6160538225093750695800, 846748983034696433927334, 128064669166890886264698699, 21195039362681903376709497444
Offset: 0
Keywords
Examples
a(2) = 10: 1/2/3/4, 12/3/4, 13/2/4, 14/2/3, 1/23/4, 1/24/3, 1/2/34, 12/34, 13/24, 14/23.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..200
Programs
-
Maple
G:= proc(n, k) option remember; local j; if k>n then G(n, n) elif n=0 then 1 elif k<1 then 0 else G(n-k, k); for j from k-1 to 1 by -1 do %*(n-j)/j +G(n-j, k) od; % fi end: a:= n-> G(2*n, n): seq(a(n), n=0..20);
-
Mathematica
G[n_, k_] := G[n, k] = If[n == 0, 1, If[k < 1, 0, Sum[G[n - k*j, k - 1]*n!/ k!^j/(n - k*j)!/j!, {j, 0, n/k}]]]; Table[G[2n, n], {n, 0, 20}] (* Jean-François Alcover, May 21 2018, translated from Maple *)
Formula
a(n) = (2n)! * [x^(2n)] exp(Sum_{j=1..n} x^j/j!).
a(n) = A229223(2n,n).