What Is a Generating Function?
Definition
For a sequence $\left\{ a_{n} \right\}$, a function $g$ that appears in the form $$ g(x) =\sum \limits _{n=0}^{\infty}a_{n}x^{n}= a_{0} + a_{1} x + a_{2} x^2 + \cdots $$ is called the generating function of the sequence $\left\{ a_{n}\right\}$ or simply a generating function. When the sequence is $a_{n}=a_{n}(x)$, it is sometimes denoted as follows. $$ G(x,t)=\sum \limits _{n=0}^{\infty}a_{n}(x)t^{n} $$
Explanation
As sharp-eyed readers may have already noticed, the Taylor series also takes a similar form. Even readers who are not so sharp will likely have encountered a similar form in high school under the name of a ‘power series’. This is because it makes for a perfect exam problem, being ideal for checking whether one understands mathematically the process of computing the sums of arithmetic and geometric sequences.
Historically, the name ‘generating function’ is known to have been coined by Laplace. Differentiating both sides $n$ times and then substituting $x=0$ gives $g^{(n)} (x) = a_{n} n!$, so we can obtain $\displaystyle a_{n} = {{g^{(n)} (x) } \over {n!}}$. In that sense, a generating function can be thought of as a ‘function that can generate’, or recover, the originally given sequence.
As a special case, there is, as mentioned earlier, the Maclaurin series $\displaystyle f(x) = \sum_{n=0}^{\infty} {{f^{(n)} (0)}\over{n!}} {x}^n$. The Maclaurin series is a case where the sequence $a_{n}$ is taken to be the $n$-th derivative coefficient of the given function.
When $1 = a_{0} = a_{1} = a_{2} = \cdots$, that is, when the coefficient of every term is 1, we pleasantly obtain the infinite geometric series $$ g(x) = 1 + x + x^2 + \cdots = {{1} \over {1-x}} $$ On the other hand, when $a_{n} = n+1$, that is, in the case of the sequence of natural numbers, it is the same as differentiating both sides of $\displaystyle g(x) = {{1} \over {1-x}}$ with respect to $x$. The result is, of course, as follows. $$ g ' (x) = 1 + 2 x + 3 x^2 + \cdots = {{1} \over {(1-x)^2 }} $$ Research on generating functions may at first glance seem entirely useless, but generalized to power functions, it is widely used across various fields of applied mathematics, statistics foremost among them. (Not surprisingly, Euler is said to have been using them to solve problems in analysis and number theory even before this name was given.)
