login
A358493
a(n) = Sum_{k=0..floor(n/3)} (n-2*k)!/k!.
4
1, 1, 2, 7, 26, 126, 745, 5163, 41052, 367981, 3669484, 40282220, 482650681, 6267119885, 87659113950, 1313921407891, 21010208286486, 356998222642362, 6423340164746737, 122001442713615031, 2439314857827015896, 51212765334037840345, 1126436834463405257528
OFFSET
0,3
LINKS
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