54
$\begingroup$

I came across a question where I needed to find the sum of the factorials of the first $n$ numbers. So I was wondering if there is any generic formula for this?

Like there is a generic formula for the series:

$$ 1 + 2 + 3 + 4 + \cdots + n = \frac{n(n+1)}{2} $$

or

$$ 1^{2} + 2^{2} + 3^{2} + 4^{2} + \cdots + n^{2} = \frac{n(n+1)(2n + 1)}{6} $$

Is there is any formula for:

$$ 1! +2! +3! + 4! + \cdots + n! $$

and

$$ {1!}^2 +{2!}^2 +{3!}^2 + \cdots + {n!}^2 $$?

Thanks in advance.

If not, is there any research on making this type of formula? Because I am interested.

  • 1
    I doubt there is such a formula. Note that the last digit of your sum is constant and equal to $1+2+6+4=3$. It would be hard to have a general formula which gives you the same last digit... (I think)2012-11-02
  • 13
    Mathematica says that: $$\sum_{n=1}^{N}{n!}=-1-(-1)¡-(-1)^{N}\cdot\Gamma{(2+N)}\cdot(-N-2)¡,$$ where $n¡$ is the [subfactorial](http://www.artofproblemsolving.com/Wiki/index.php/Derangement)2012-11-02
  • 1
    See also: http://mathworld.wolfram.com/FactorialSums.html2013-01-14

3 Answers 3