OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..150
FORMULA
MAPLE
g:= proc(n) g(n):= `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
a:= n-> add(binomial(n, k)*Stirling2(n, k)*k!*
add(binomial(n-k, i)*binomial(k, i)*i!*
g(k-i)*n^(n-k-i), i=0..min(k, n-k)), k=0..n):
seq(a(n), n=0..20); # Alois P. Heinz, Jul 18 2014
MATHEMATICA
g[n_] := g[n] = If[n < 2, 1, g[n-1] + (n-1)*g[n-2]];
a[n_] := If[n == 0, 1, Sum[Binomial[n, k]*StirlingS2[n, k]*k!*Sum[ Binomial[n-k, i]*Binomial[k, i]*i!*g[k-i]*n^(n-k-i), {i, 0, Min[k, n-k]} ], {k, 0, n}]];
a /@ Range[0, 20] (* Jean-François Alcover, Oct 03 2019, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Chad Brewbaker, Mar 26 2014
EXTENSIONS
a(6)-a(7) from Giovanni Resta, Mar 28 2014
a(8)-a(16) from Alois P. Heinz, Jul 18 2014
STATUS
approved