# Generating function for gamma function (or factorial)

Does exist a generating function for the gamma function or for the factorial?

$$F(x)=\sum\limits_{k=0}^\infty k!x^k$$ or $$G(x)=\sum\limits_{k=0}^\infty \Gamma (k)x^k$$

I'm assuming it does not, as I did not find any by searching online. But maybe there is a way to get a suitable approximation.

Thank you, Janus

• If you care about convergence then by using the factorial as coefficient you will get in trouble (see ratio test). – MrYouMath Nov 10 '16 at 11:48
• Your series don't nconverge. If you want a generating function of $\{a_n\}$ a strictly increasing sequence of natural numbers, then you can look at $f(x) = \sum_{n=0}^\infty a_n x^{a_n}$ or $g(x) =\sum_{n=0}^\infty x^{a_n}$ (such that $f(x) = x g'(x)$) whose radius of convergence is $1$ – reuns Nov 10 '16 at 12:14
• @Ambesh: let's add the exponential generating function $\dfrac 1{1-x}=\sum\limits_{k=0}^\infty k!\dfrac{x^k}{k!}\,$ (trivial and not helpful but :-)) – Raymond Manzoni Nov 10 '16 at 13:31
• Whether or not you can find something by searching does not mean it exists or doesn't exist. – Simply Beautiful Art Nov 10 '16 at 23:59
• Huh, the second sum uses $\Gamma(0)$. I wonder what that is. – Simply Beautiful Art Nov 11 '16 at 0:45

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.

• Thank you for referring to an excellent paper. The answer to the question is on p.8 no closed form exists for the o.g.f as special functions but it can be expressed as J-fractions. $\frac{1}{1-z-\frac{1^2.z^2}{1-3z-\frac{2^2.z^2}{...}}}$ – jayprich Oct 4 '18 at 8:50

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$.

A bit similar to Raymond's answer in spirit,

Start off with

$$F(x)=\sum_{k=0}^\infty k!x^k$$

$$f(x)=xF(x)=\sum_{k=0}^\infty k!x^{k+1}$$

$$f'(x)=\sum_{k=0}^\infty k!(k+1)x^k=\sum_{k=0}^\infty(k+1)!x^k=\frac1x\left(-1+\sum_{k=0}^\infty k!x^k\right)$$

$$xf'(x)=-1+f(x)$$

This is a rather easy DE to solve, and it gives,

$$f(x)=cx+1$$

Now, this is a bit awkward, since we would imagine $f(0)=0$, but this cannot be the case. I guess this would mean that we would have $f(0)=1$. Weird, huh? Anyways, this gives us

$$F(x)=c+\frac1x$$

Since both definitions of $F(x)$ and $f(x)$ are divergent series, I can't really tell you what $c$ is.

• the 4 first lines are rigorous only when using something like the formal power series, the rest is a nonsense – reuns Nov 11 '16 at 1:40
• In the ring (field) of formal power (Laurent) series $\sum_{k \ge 0} k! x^k \ne cx+1$ – reuns Nov 11 '16 at 1:41

(via mds's answer) see Flajolet, P., Combinatorial aspects of continued fractions, Discrete Math. 32, 125-161 (1980). PDF at inria.fr. for this combinatorial analytic interpretation as counting paths through a tree.

p. 145 Theorem 3B

"Permutations in $$S_{n+1}$$ correspond to trees with $$(n+1)$$ at the bottom of the right branch. By the Françon-Viennot correspondence; they are associated to diagrammes $$(u, s)$$ with forbidden positions, given by $$\begin{array}{cc} \forall & 1\le i\le n, & \mathbb{if} \space u_i = b_k : & s_i \ne k, \\ & & \mathbb{if} \space u_i = c_i^{''} : & s_i \ne j. \end{array}$$ These restrictions express on the path diagramme the fact that no left branching son nor leaf different from $$(n+1)$$ can occur on the right branch of the tournament tree at any intermediary stage of the construction.

$$\sum{n!z^n}=\frac{1}{1-z-\frac{1^2.z^2}{1-3z-\frac{2^2.z^2}{...}}}$$

J. Françon and G. Viennot - "Permutations selon les pics, creux, doubles montees, doubles descentes, nombres d'Euler et nombres de Genocchi" Discrete Math. 28 (1979) 21-35.