OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..380
MAPLE
with(combinat):
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(`if`(irem(j, igcd(i, 3))<>0, 0, b(n-i*j, i-1)*
(i-1)!^j*multinomial(n, n-i*j, i$j)/j!), j=0..n/i)))
end:
a:= n-> add(b(j$2)*n^(n-j)*binomial(n-1, j-1), j=0..n):
seq(a(n), n=0..25);
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 08 2014
STATUS
approved