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