# Compact formula for $\sum_k k!$ [duplicate]

Is there any compact formula for:

$$\sum_{k=0}^n k!$$

I've tried to find it using one method for summation, but I was able to receive only compact formula for $\sum_k k! \cdot k = (n+1)!-1$

I've typed it into wolfram, but answer is also pretty complicated.

## marked as duplicate by J. M. is a poor mathematician, Pedro Tamaroff♦, Henry T. Horton, vonbrand, MicahApr 4 '13 at 0:48

• I want to find compact formula for $\sum_{k=0}^n (k^2+1)k!$, and I have simplified everything besides part $\sum_k k!$ – JosephConrad Apr 3 '13 at 21:23
• Here's a direction: we have that $(k+1)^2 = k^2 + 2k + 1$, so that $(k+1)^2 k! = (k+1) \cdot (k+1)!$. You know a form for the sum of $k \cdot k!$, so do you see how to get a form for $(k^2 + 1) k!$? – A Blumenthal Apr 3 '13 at 21:28
• $(k+1)^2-2k=k^2+1$. – i707107 Apr 3 '13 at 21:34
• OK guys, I've solved this task. Thank you all for your hints! Because questions is connected with $\sum_k k!$ I accepted this answer that refers to that sum. – JosephConrad Apr 3 '13 at 21:44

You may prefer to deal with the following integral representation

$$\sum_{k=0}^{n}k! = \sum_{k=0}^{n} \Gamma(k+1)= \sum_{k=0}^{n}\int_{0}^{\infty}x^{k}e^{-x}dx = \int_{0}^{\infty}\frac{x^{n+1}-1}{x-1}e^{-x}dx ,$$

where $\Gamma(s)$ is the gamma function.

• I hereby annoit Mhenni as king of the Gamma functions! (+1) – Ron Gordon Apr 3 '13 at 21:49
• @RonGordon: Thanks for the comment. I really appreciate it. On this website, we are really learning from each other. Thanks for everyone who is contributing and working on this website. – Mhenni Benghorbal Apr 3 '13 at 22:21

This is A003422; the only more or less closed form expression given there is

$$\sum_{k=0}^{n-1}k!=\int_0^\infty\frac{x^n-1}{x-1}e^{-x}dx\;.$$

• But note also the e.g.f.: $(Ei(1)-Ei(1-x)) e^{x-1}$. That is, $\sum_{i=0}^{n-1} i!$ is $n!$ times the coefficient of $x^n$ in the Taylor series of that function. – Robert Israel Apr 3 '13 at 22:32

\begin{align} \sum_{k=0}^n (k^2+1)k! &= \sum_{k=0}^n [(k+1)^2-2k]k! \\ &= \sum_{k=0}^n (k+1)(k+1)! -\sum_{k=0}^n 2k \cdot k! \\ &= \bigl((n+2)!+1\bigr) -2 \bigl((n+1)!+1\bigr) \\ &= n(n+1)! -1 \end{align}

• You forgot to multiply 2 in the third formula. – i707107 Apr 3 '13 at 21:56
• I fixed it.. ty. – Halil Duru Apr 3 '13 at 21:57
• Note that this (through whatever OP did to get $\sum k^2 k!$) would give a nice formula for $\sum k!$, to be reported at OEIS (and make this site world famous ;-)... – vonbrand Apr 3 '13 at 22:20
• Good point ,OP must have made a mistake there--- otherwise we would have contacted The On-line Encyclopedia of Integer Sequences. – Halil Duru Apr 3 '13 at 22:39
• Yes, that's right I've made a mistake in my calculation. Well, unfortunately, we did not discover a new formula for $\sum k!$ :) – JosephConrad Apr 3 '13 at 23:03