OFFSET
0,3
FORMULA
a(n) = (-1)^n + Sum_{k=1..n} 3^(k-1) * (k-1)! * binomial(n,k) * a(n-k).
PROG
(PARI) a_vector(n) = my(v=vector(n+1)); for(i=0, n, v[i+1]=(-1)^i+sum(j=1, i, 3^(j-1)*(j-1)!*binomial(i, j)*v[i-j+1])); v;
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Dec 24 2023
STATUS
approved