The word “function” is put in quotes as we do not necessarily care about substituting a value of \(x\) and obtaining a specific value for \(F(x)\text{.}\) In other words, we consider \(F(x)\) as a formal power series and frequently ignore issues of convergence.
It is customary to refer to \(F(x)\) as the generating function of the sequence \(\sigma\text{.}\) As we have already remarked, we are not necessarily interested in calculating \(F(x)\) for specific values of \(x\text{.}\) However, by convention, we take \(F(0)=a_0\text{.}\)
Consider the constant sequence \(\sigma=\{a_n:n\ge0\}\) with \(a_n=1\) for every \(n\ge0\text{.}\) Then the generating function \(F(x)\) of \(\sigma\) is given by
You may remember that this last expression is the Maclaurin series for the function \(F(x)=1/(1-x)\) and that the series converges when \(|x|\lt 1\text{.}\) Since we want to think in terms of formal power series, let’s see that we can justify the expression
and notice that, since we multiply formal power series just like we multiply polynomials (power series are pretty much polynomials that go on forever), we have that this product is
Just like you learned in calculus for Maclaurin series, formal power series can be differentiated and integrated term by term. The rigorous mathematical framework that underlies such operations is not our focus here, so take us at our word that this can be done for formal power series without concern about issues of convergence.
Before you become convinced that we’re only going to concern ourselves with generating functions that actually converge, let’s see that we can talk about the formal power series
even though it has radius of convergence \(0\text{,}\) i.e., the series \(F(x)\) converges only for \(x=0\text{,}\) so that \(F(0)=1\text{.}\) Nevertheless, it makes sense to speak of the formal power series \(F(x)\) as the generating function for the sequence \(\{a_n:n\ge0\}\text{,}\)\(a_0=1\) and \(a_n\) is the number of permutations of \(\{1,2,\dots,n\}\) when \(n\ge1\text{.}\)
Let \(A(x)=\sum_{n=0}^\infty a_nx^n\) and \(B(x)=\sum_{n=0}^\infty b_nx^n\) be generating functions. Then \(A(x)B(x)\) is the generating function of the sequence whose \(n^{th}\) term is given by