OFFSET
0,3
FORMULA
a(n) = Sum_{k=0..floor(n/3)} (-1)^k * (n-3*k)! * binomial(n-2*k-1,k).
a(n) = n*a(n-1) + a(n-3) + (n-6)*a(n-4) + 2*a(n-6) for n > 6.
PROG
(PARI) my(N=30, x='x+O('x^N)); Vec(sum(k=0, N, k!*(x/(1+x^3))^k))
(PARI) a(n) = sum(k=0, n\3, (-1)^k*(n-3*k)!*binomial(n-2*k-1, k));
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Feb 25 2024
STATUS
approved