# ∑k!=1!+2!+3!+⋯+n!\sum k! = 1! +2! +3! + \cdots + n! ,is there a generic formula for this?

I came across a question where I needed to find the sum of the factorials of the first $$nn$$ 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+⋯+n=n(n+1)2 1 + 2 + 3 + 4 + \cdots + n = \frac{n(n+1)}{2}$$

or

$$12+22+32+42+⋯+n2=n(n+1)(2n+1)6 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!+⋯+n! 1! +2! +3! + 4! + \cdots + n!$$

and

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

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

(Too long for a comment)

I don’t know if there’s a simpler form, but the sum of factorials has certainly been well-studied. In the literature, it is referred to as either the left factorial (though this term is also used for the more common subfactorial) or the Kurepa function (after the Balkan mathematician Đuro Kurepa).

In particular, for $K(n)=\sum\limits_{j=0}^{n-1}j!$ (using the notation $K(n)$ after Kurepa), we have as an analytic continuation the integral representation

and a further continuation to the left half-plane is possible from the functional equation $K(z)-K(z-1)=\Gamma(z)$

An expression in terms of “more usual” special functions, equivalent to the one in Shaktal’s comment, is

where $E_p(z)$ and $\mathrm{Ei}(z)$ are the exponential integrals.

The sum of squares of factorials does not seem to have a simple closed form, but the sequence is listed in the OEIS. One can, however, derive an integral representation that could probably be used as a starting point for analytic continuation. In particular, we have

where $K_0(z)$ is the modified Bessel function of the second kind.