OFFSET
1,3
COMMENTS
The formula is a generalization of the formula given in A327643.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..460
Wikipedia, Multinomial coefficients
Wikipedia, Partition (number theory)
MAPLE
with(combinat):
a:= proc(n) option remember; `if`(n<2, 1, add(mul(a(i), i=p)
*multinomial(n-nops(p), map(x-> x-1, p)[]),
p=select(x-> nops(x)>1, partition(n))))
end:
seq(a(n), n=1..24);
# second Maple program:
b:= proc(n, p, i) option remember; `if`(n=0, p!, `if`(i<1, 0,
b(n, p, i-1) +a(i)*b(n-i, p-1, min(n-i, i))/(i-1)!))
end:
a:= n-> `if`(n<2, 1, b(n$2, n-1)):
seq(a(n), n=1..24);
MATHEMATICA
b[n_, p_, i_] := b[n, p, i] = If[n == 0, p!, If[i < 1, 0, b[n, p, i - 1] + a[i] b[n - i, p - 1, Min[n - i, i]]/(i - 1)!]];
a[n_] := If[n < 2, 1, b[n, n, n - 1]];
Array[a, 24] (* Jean-François Alcover, May 03 2020, after 2nd Maple program *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 23 2019
STATUS
approved