Generating function for the factorial sequence

Solution 1:

You should ask what it means to "arrive at the generation function". Since your series cannot be interpreted as one defining a analytic function $f(x)$ for $x$ in some neighbourhood of $0$ (for that the series would have to have a positive radius of convergence, which it doesn't), you should not expect to find an expression that describes such a function and which is somehow "equal" to your formal power series. It is a general fact that any formal power series in $x$ occurs as the Taylor series of some smooth real function of $x$, but the behaviour of such a function, which is far from unique, away from $x=0$ is entirely unrelated to your formal power series, so you won't find such an $f$ easily either.

What you can do is find a formal differential equation that is satisfied by your power series, and I think this is what your professor is asking for. Here is how you can do it: the coefficients $c_k=k!$ of your series, which I shall call $S$, clearly satisfy the recurrence $c_{k+1}=(k+1)c_k$ for all $k\in\mathbf N$. If you multiply a formal power series $\sum_{k\in\mathbf N}c_kx^k$ by $x$ and then differentiate, you get $\sum_{k\in\mathbf N}(k+1)c_kx^k$, and multiplying once more by $x$ gives $\sum_{k\in\mathbf N}(k+1)c_kx^{k+1}$. In the case of $S$, the result is almost identical to the original series, only the constant term $1$ has disappeared. So denoting by $D_x$ formal differentiation with respect to $x$, your series satisfies $$ S=1+xD_x(xS), $$ or after some simple rewriting $$ (1-x)S=1+x^2D_x(S). $$ For the reasons indicated above you should not expect this differential equation to have any solutions in the neighbourhood of $x=0$, and any solutions it has away from $0$ bear little relation to your series. But your series does satisfy the equation. Note that unlike the ordinary handling of differential equations, this one needs no "initial condition": the equation itself makes it clear that the constant term of $S$ is $1$.

Solution 2:

Euler considered the (alternate) series $$f(x)=1-1!x+2!x^2-3!x^3+\cdots$$ and used $\phi(x)=x\cdot f(x)$ and term-by-term differentiation to get $$x^2\phi'(x)+\phi(x)=x$$

Try to solve this ODE before consulting Hardy's derivation (and yes the series is divergent everywhere except at $0$).

Fine continuation!

Solution 3:

Well, formally $$\begin{align} f(x) &= \sum_{k=0}^\infty k!x^k \\ x f(x) &= \sum_{k=0}^\infty k!x^{k+1} = \sum_{k=1}^\infty (k-1)! x^k \\ \frac{d}{dx}\big(xf(x)\big) &= \sum_{k=!}^\infty (k-1)! k x^{k-1} = \sum_{k=1}^\infty k!x^{k-1} \\ 1+x\frac{d}{dx}\big(xf(x)\big) &= \sum_{k=0}^\infty k!x^k = f(x) \end{align}$$ so you get a differential equation for $f(x)$. Despite its divergence everywhere.