Is there any formula for $\sum_{k=1}^n k!$?

192 Views Asked by At

Do we have any formula for the sum of factorials above?

2

There are 2 best solutions below

0
On

According to its OEIS page, we have $$\sum_{k=0}^{n-1} k! = \int_0^{+\infty} \frac{x^n - 1}{x - 1}\, e^{-x}\, dx.$$

(I know it's probably not the kind of formulae you're after, but there is not a fundamentally better answer.)

0
On

There is not a closed 'closed' form, but:

$$\sum_{k=a}^nk!=-(-1)^a\Gamma(a+1)\cdot!(-a-1)-(-1)^n\Gamma(n+2)\cdot!(-n-2)$$

Where $\Gamma(x)$ is the gamma function and $!n$ is the subfactorial function.