OFFSET
0,2
FORMULA
a(n) = n! * Sum_{k=0..n} k^(n-k) * binomial(3,k)/(n-k)!.
G.f.: (1-17*x+127*x^2-542*x^3+1453*x^4-2543*x^5+2973*x^6-2478*x^7+1626*x^8-648*x^9) / ((1-x)^2*(1-2*x)^3*(1-3*x)^4).
PROG
(PARI) a(n) = n!*sum(k=0, n, k^(n-k)*binomial(3, k)/(n-k)!);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Nov 02 2024
STATUS
approved