Skip to main content
\(\newcommand{\set}[1]{\{1,2,\dotsc,#1\,\}} \newcommand{\ints}{\mathbb{Z}} \newcommand{\posints}{\mathbb{N}} \newcommand{\rats}{\mathbb{Q}} \newcommand{\reals}{\mathbb{R}} \newcommand{\complexes}{\mathbb{C}} \newcommand{\twospace}{\mathbb{R}^2} \newcommand{\threepace}{\mathbb{R}^3} \newcommand{\dspace}{\mathbb{R}^d} \newcommand{\nni}{\mathbb{N}_0} \newcommand{\nonnegints}{\mathbb{N}_0} \newcommand{\dom}{\operatorname{dom}} \newcommand{\ran}{\operatorname{ran}} \newcommand{\prob}{\operatorname{prob}} \newcommand{\Prob}{\operatorname{Prob}} \newcommand{\height}{\operatorname{height}} \newcommand{\width}{\operatorname{width}} \newcommand{\length}{\operatorname{length}} \newcommand{\crit}{\operatorname{crit}} \newcommand{\inc}{\operatorname{inc}} \newcommand{\HP}{\mathbf{H_P}} \newcommand{\HCP}{\mathbf{H^c_P}} \newcommand{\GP}{\mathbf{G_P}} \newcommand{\GQ}{\mathbf{G_Q}} \newcommand{\AG}{\mathbf{A_G}} \newcommand{\GCP}{\mathbf{G^c_P}} \newcommand{\PXP}{\mathbf{P}=(X,P)} \newcommand{\QYQ}{\mathbf{Q}=(Y,Q)} \newcommand{\GVE}{\mathbf{G}=(V,E)} \newcommand{\HWF}{\mathbf{H}=(W,F)} \newcommand{\bfC}{\mathbf{C}} \newcommand{\bfG}{\mathbf{G}} \newcommand{\bfH}{\mathbf{H}} \newcommand{\bfF}{\mathbf{F}} \newcommand{\bfI}{\mathbf{I}} \newcommand{\bfK}{\mathbf{K}} \newcommand{\bfP}{\mathbf{P}} \newcommand{\bfQ}{\mathbf{Q}} \newcommand{\bfR}{\mathbf{R}} \newcommand{\bfS}{\mathbf{S}} \newcommand{\bfT}{\mathbf{T}} \newcommand{\bfNP}{\mathbf{NP}} \newcommand{\bftwo}{\mathbf{2}} \newcommand{\cgA}{\mathcal{A}} \newcommand{\cgB}{\mathcal{B}} \newcommand{\cgC}{\mathcal{C}} \newcommand{\cgD}{\mathcal{D}} \newcommand{\cgE}{\mathcal{E}} \newcommand{\cgF}{\mathcal{F}} \newcommand{\cgG}{\mathcal{G}} \newcommand{\cgM}{\mathcal{M}} \newcommand{\cgN}{\mathcal{N}} \newcommand{\cgP}{\mathcal{P}} \newcommand{\cgR}{\mathcal{R}} \newcommand{\cgS}{\mathcal{S}} \newcommand{\bfn}{\mathbf{n}} \newcommand{\bfm}{\mathbf{m}} \newcommand{\bfk}{\mathbf{k}} \newcommand{\bfs}{\mathbf{s}} \newcommand{\bijection}{\xrightarrow[\text{onto}]{\text{$1$--$1$}}} \newcommand{\injection}{\xrightarrow[]{\text{$1$--$1$}}} \newcommand{\surjection}{\xrightarrow[\text{onto}]{}} \newcommand{\nin}{\not\in} \newcommand{\prufer}{\mbox{prüfer}} \DeclareMathOperator{\fix}{fix} \DeclareMathOperator{\stab}{stab} \DeclareMathOperator{\var}{var} \newcommand{\inv}{^{-1}} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section8.1Basic Notation and Terminology

With a sequence \(\sigma=\{a_n:n\ge0\}\) of real numbers, we associate a “function” \(F(x)\) defined by \begin{equation*} F(x)=\sum_{n=0}^\infty a_n x^n. \end{equation*} 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{.}\)

Example8.1

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 \begin{equation*} F(x)=1+x+x^2+x^3+x^4+x^5+x^6+\cdots. \end{equation*}

You probably 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 \begin{equation*} \frac{1}{1-x}=1+x+x^2+x^3+x^4+x^5+x^6+\cdots=\sum_{n=0}^\infty x^n \end{equation*} without any calculus techniques. Consider the product \begin{equation*} (1-x)(1+x+x^2+x^3+x^4+x^5+x^6+\cdots) \end{equation*} 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 \begin{equation*} (1+x+x^2+x^3+x^4+x^5+x^6+\cdots)-x(1+x+x^2+x^3+x^4+x^5+x^6+\cdots) = 1. \end{equation*} Now we have that \begin{equation*} (1-x)(1+x+x^2+x^3+x^4+x^5+x^6+\cdots) = 1, \end{equation*} or, more usefully, after dividing through by \(1-x\text{,}\) \begin{equation*} \frac{1}{1-x} = \sum_{n=0}^\infty x^n. \end{equation*}

Example8.2

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.

To see this in action, consider differentiating the power series of the previous example. This gives \begin{equation*} \frac{1}{(1-x)^2}=1+2x+3x^2+4x^3+5x^4+6x^5+7x^6+\dots=\sum_{n=1}^\infty nx^{n-1}. \end{equation*} Integration of the series represented by \(1/(1+x) = 1/(1-(-x))\) yields (after a bit of algebraic manipulation) \begin{equation*} \log(1+x)=x-\frac{x^2}{2}+\frac{x^3}{3}-\frac{x^4}{4}+\frac{x^5}{5}- \frac{x^6}{6}+\dots=\sum_{n=1}^\infty (-1)^{n+1}\frac{x^n}{n}. \end{equation*}

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 \begin{equation*} F(x)=\sum_{n=0}^{\infty} n! x^n, \end{equation*} 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{.}\)

For reference, we state the following elementary result, which emphasizes the form of a product of two power series.