OFFSET
0,2
FORMULA
a(0) = 1; a(n) = n * a(n-1) + Sum_{k=1..n} 3^k * binomial(n,k) * a(n-k).
MATHEMATICA
With[{nn=20}, CoefficientList[Series[1/(2-x-Exp[3x]), {x, 0, nn}], x] Range[0, nn]!] (* Harvey P. Dale, Feb 16 2024 *)
PROG
(PARI) a_vector(n) = my(v=vector(n+1)); v[1]=1; for(i=1, n, v[i+1]=i*v[i]+sum(j=1, i, 3^j*binomial(i, j)*v[i-j+1])); v;
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Dec 02 2023
STATUS
approved