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