OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..200
Wikipedia, Permutation
FORMULA
a(n) = A285849(2n,n).
EXAMPLE
a(1) = 1: (12).
a(2) = 19: (123)(4), (4)(123), (132)(4), (4)(132), (124)(3), (3)(124), (142)(3), (3)(142), (134)(2), (2)(134), (143)(2), (2)(143), (1)(234), (234)(1), (1)(243), (243)(1), (12)(34), (13)(24), (14)(23).
MAPLE
b:= proc(n, i, p) option remember; expand(`if`(n=0 or i=1,
(p+n)!/n!*x^n, add(b(n-i*j, i-1, p+j)*(i-1)!^j*combinat
[multinomial](n, n-i*j, i$j)/j!^2*x^j, j=0..n/i)))
end:
a:= n-> coeff(b(2*n$2, 0), x, n):
seq(a(n), n=0..20);
MATHEMATICA
multinomial[n_, k_List] := n!/Times @@ (k!);
b[n_, i_, p_] := b[n, i, p] = Expand[If[n == 0 || i == 1, (p + n)!/n!*x^n, Sum[b[n - i*j, i - 1, p + j]*(i - 1)!^j*multinomial[n, Join[{n - i*j}, Table[i, j]]]/j!^2*x^j, {j, 0, n/i}]]];
a[n_] := Coefficient[b[2n, 2n, 0], x, n];
Table[a[n], {n, 0, 20}] (* Jean-François Alcover, May 29 2018, from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 27 2017
STATUS
approved