Generating function for gamma function (or factorial)

Solution 1:

More generally, Borel-regularized sums of these the (formal, initially) ordinary generating functions of any integer-valued multi-factorial function can be given in terms of the incomplete gamma function. See pages 9 and 10 of this article for specifics. The resulting generating functions in this case are highly non-elementary and can be a pain to work with. However, we can always define these generating functions formally and work with the generating function within the ring of formal power series.

In particular, formal infinite Jacobi-type continued fractions for the generating function you requested can be defined (see this article by Flajolet for examples), and moreover, the rational $h^{th}$ convergents to these infinite continued fractions (which are always convergent functions of $z$) approximate the terms up to order $2h$. In the second article properties of a more general class of factorial functions are considered by generalizing Flajolet's result for the rising factorial function $r^{\bar{n}}$ specialized to particular values of $r = r(n)$ which then generates the single factorial function as a special case. The rational convergents to these generating functions are easy to work with and lead to new identities and expansions of $n!$ including exact formulas in terms of the special zeros of the (associated) Laguerre polynomials.

Solution 2:

The divergent séries $\;f(x):=\sum\limits_{k=0}^\infty k!\,(-x)^k\;$ was considered by Euler and revisited by Hardy in his book Divergent Series (p. $26$). Defining $\,\phi(x):=x\,f(x)\,$ Euler obtained the differential equation : $$\tag{1}x^2\phi(x)'+\phi(x)=x$$ which may be solved using the integrating factor $\,x^{-2}e^{-1/x}\,$ with the solution (cf the link) : $$\tag{2}f(x)=\int_0^\infty\frac {e^{-w}}{1+xw}\,dw$$ that we may rewrite (from the definition of the exponential integral) as : $$\tag{3}f(x)=-\frac{e^{1/x}}x\operatorname{Ei}\left(-\frac 1x\right)$$ Replace $\,x\,$ by $-x\,$ to get your wished (regularized) function $F$.