OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..445
FORMULA
a(n) = (n-1) * a(n-1) + (n-2) * a(n-2) + (n-4) * a(n-3) - 2 * a(n-4) - 2 * a(n-5) + 3 for n > 4.
a(n) ~ n! * (1 + 1/n^2 + 1/n^3 + 3/(2*n^4) + 4/n^5 + 41/(3*n^6) + 97/(2*n^7) + 1399/(8*n^8) + 3961/(6*n^9) + 322951/(120*n^10) + ...). - Vaclav Kotesovec, Nov 24 2022
G.f.: Sum_{k>=0} k! * x^k/(1-x^3)^(k+1). - Seiichi Manyama, Feb 26 2024
MATHEMATICA
Table[Sum[(n-2*k)!/k!, {k, 0, Floor[n/3]}], {n, 0, 30}] (* G. C. Greubel, May 01 2024 *)
PROG
(PARI) a(n) = sum(k=0, n\3, (n-2*k)!/k!);
(Magma)
[(&+[Factorial(n-2*k)/Factorial(k): k in [0..Floor(n/3)]]): n in [0..30]]; // G. C. Greubel, May 01 2024
(SageMath)
[sum(factorial(n-2*k)/factorial(k) for k in range(1+n//3)) for n in range(31)] # G. C. Greubel, May 01 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Nov 19 2022
STATUS
approved