OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..470
Wikipedia, Permutation
EXAMPLE
a(4) = 4: (1)(2)(3)(4), (1,2)(3,4), (1,3)(2,4), (1,4)(2,3).
MAPLE
b:= proc(n, i) option remember; `if`(n=0 or i=1, 1,
add(combinat[multinomial](n, i$i*j, n-i^2*j)*
b(n-i^2*j, i-1)*(i-1)!^(i*j)/(i*j)!, j=0..n/i^2))
end:
a:= n-> b(n$2):
seq(a(n), n=0..25);
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 01 2024
STATUS
approved