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