OFFSET
1,3
LINKS
N. J. A. Sloane and Alois P. Heinz, Table of n, a(n) for n = 1..450 (first 30 terms from N. J. A. Sloane)
MAPLE
with(combinat):
b:= proc(n, i) option remember; `if`(n=0, [1, 0], `if`(i<1, 0,
add(multinomial(n, n-i*j, i$j)/j!*(i-1)!^j*(p-> p+
`if`(i::even, [0, p[1]*j^2], 0))(b(n-i*j, i-1)), j=0..n/i)))
end:
a:= n-> b(n$2)[2]:
seq(a(n), n=1..30); # Alois P. Heinz, Oct 21 2015
MATHEMATICA
multinomial[n_, k_] := n!/Times @@ (k!); b[n_, i_] := b[n, i] = If[n==0, {1, 0}, If[i<1, {0, 0}, Sum[multinomial[n, Join[{n-i*j}, Array[i&, j]]]/j! * (i-1)!^j * Function[p, p+If[EvenQ[i], {0, p[[1]]*j^2}, {0, 0}]][b[n-i*j, i-1]], {j, 0, n/i}]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Mar 13 2017, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 22 2009
STATUS
approved