OFFSET
0,3
FORMULA
a(0) = 1; a(n) = 3 * n * Sum_{k=2..n} binomial(n-1,k-1) * a(n-k).
a(n) = n! * Sum_{k=0..floor(n/2)} 3^k * k! * Stirling2(n-k,k)/(n-k)!.
PROG
(PARI) a(n) = n!*sum(k=0, n\2, 3^k*k!*stirling(n-k, k, 2)/(n-k)!);
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Dec 03 2023
STATUS
approved