OFFSET
0,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..449
FORMULA
a(n) = Sum_{k=floor(n/2)..n} k! * binomial(k+1,n-k).
a(n) = (n-2) * a(n-1) + 2 * (n-1) * a(n-2) + (n-2) * a(n-3) for n > 2.
a(n) ~ exp(1) * n! * (1 - 1/n + 3/(2*n^2) - 2/(3*n^3) - 47/(24*n^4) + 49/(120*n^5) + 6421/(720*n^6) + ...). - Vaclav Kotesovec, Dec 11 2021
MATHEMATICA
a[n_] := Sum[k! * Binomial[k + 1, n - k], {k, Floor[n/2], n}]; Array[a, 22, 0] (* Amiram Eldar, Nov 30 2021 *)
PROG
(PARI) a(n) = sum(k=n\2, n, k!*binomial(k+1, n-k));
(PARI) a(n) = if(n<3, 2^n, (n-2)*a(n-1)+2*(n-1)*a(n-2)+(n-2)*a(n-3));
(PARI) my(N=40, x='x+O('x^N)); Vec(sum(k=0, N, k!*x^k*(1+x)^(k+1)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Nov 30 2021
STATUS
approved