OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..500
EXAMPLE
a(3) = 8: 3abc, 2ab1c, 2ac1b, 2bc1a, 1a2bc, 1b2ac, 1c2ab, 1a1b1c.
MAPLE
b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
add(b(n-i*j, i-1, p+j)/j!*binomial(n, i*j), j=0..n/i)))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..25);
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i < 1, 0, Sum[b[n - i*j, i - 1, p + j]/j!*Binomial[n, i*j], {j, 0, n/i}]]];
a[n_] := b[n, n, 0];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, May 17 2018, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Aug 31 2015
STATUS
approved