Generating function





In mathematics, a generating function is a way of encoding an infinite sequence of numbers (an) by treating them as the coefficients of a power series. This formal power series is the generating function. Unlike an ordinary series, this formal series is allowed to diverge, meaning that the generating function is not always a true function and the "variable" is actually an indeterminate. Generating functions were first introduced by Abraham de Moivre in 1730, in order to solve the general linear recurrence problem.[1] One can generalize to formal series in more than one indeterminate, to encode information about arrays of numbers indexed by several natural numbers.


There are various types of generating functions, including ordinary generating functions, exponential generating functions, Lambert series, Bell series, and Dirichlet series; definitions and examples are given below. Every sequence in principle has a generating function of each type (except that Lambert and Dirichlet series require indices to start at 1 rather than 0), but the ease with which they can be handled may differ considerably. The particular generating function, if any, that is most useful in a given context will depend upon the nature of the sequence and the details of the problem being addressed.


Generating functions are often expressed in closed form (rather than as a series), by some expression involving operations defined for formal series. These expressions in terms of the indeterminate x may involve arithmetic operations, differentiation with respect to x and composition with (i.e., substitution into) other generating functions; since these operations are also defined for functions, the result looks like a function of x. Indeed, the closed form expression can often be interpreted as a function that can be evaluated at (sufficiently small) concrete values of x, and which has the formal series as its series expansion; this explains the designation "generating functions". However such interpretation is not required to be possible, because formal series are not required to give a convergent series when a nonzero numeric value is substituted for x. Also, not all expressions that are meaningful as functions of x are meaningful as expressions designating formal series; for example, negative and fractional powers of x are examples of functions that do not have a corresponding formal power series.


Generating functions are not functions in the formal sense of a mapping from a domain to a codomain. Generating functions are sometimes called generating series,[2] in that a series of terms can be said to be the generator of its sequence of term coefficients.




Contents






  • 1 Definitions


    • 1.1 Ordinary generating function (OGF)


    • 1.2 Exponential generating function (EGF)


    • 1.3 Poisson generating function


    • 1.4 Lambert series


    • 1.5 Bell series


    • 1.6 Dirichlet series generating functions (DGFs)


    • 1.7 Polynomial sequence generating functions




  • 2 Ordinary generating functions


    • 2.1 Examples of generating functions for simple sequences


    • 2.2 Rational functions


    • 2.3 Operations on generating functions


      • 2.3.1 Multiplication yields convolution


      • 2.3.2 Shifting sequence indices


      • 2.3.3 Differentiation and integration of generating functions


      • 2.3.4 Enumerating arithmetic progressions of sequences




    • 2.4 P-recursive sequences and holonomic generating functions


      • 2.4.1 Definitions


      • 2.4.2 Examples


      • 2.4.3 Software for working with P-recursive sequences and holonomic generating functions




    • 2.5 Relation to discrete-time Fourier transform


    • 2.6 Asymptotic growth of a sequence


      • 2.6.1 Asymptotic growth of the sequence of squares


      • 2.6.2 Asymptotic growth of the Catalan numbers




    • 2.7 Bivariate and multivariate generating functions


    • 2.8 Representation by continued fractions (Jacobi-type J-fractions)


      • 2.8.1 Definitions


      • 2.8.2 Properties of the hth convergent functions


      • 2.8.3 Examples






  • 3 Examples


    • 3.1 Ordinary generating function


    • 3.2 Exponential generating function


    • 3.3 Lambert series


    • 3.4 Bell series


    • 3.5 Dirichlet series generating function


    • 3.6 Multivariate generating functions




  • 4 Applications


    • 4.1 Various techniques: Evaluating sums and tackling other problems with generating functions


      • 4.1.1 Example 1: A formula for sums of harmonic numbers


      • 4.1.2 Example 2: Modified binomial coefficient sums and the binomial transform


      • 4.1.3 Example 3: Generating functions for mutually recursive sequences




    • 4.2 Convolution (Cauchy products)


      • 4.2.1 Example: The generating function for the Catalan numbers


      • 4.2.2 Example: Spanning trees of fans and convolutions of convolutions




    • 4.3 Implicit generating functions and the Lagrange inversion formula


    • 4.4 Introducing a free parameter (snake oil method)


    • 4.5 Generating functions prove congruences


      • 4.5.1 The Stirling numbers modulo small integers


      • 4.5.2 Congruences for the partition function




    • 4.6 Transformations of generating functions


    • 4.7 Other applications




  • 5 Other generating functions


    • 5.1 Examples


    • 5.2 Convolution polynomials


    • 5.3 Tables of special generating functions




  • 6 History


  • 7 See also


  • 8 Notes


  • 9 References


  • 10 External links





Definitions



A generating function is a device somewhat similar to a bag. Instead of carrying many little objects detachedly, which could be embarrassing, we put them all in a bag, and then we have only one object to carry, the bag.

—George Polya, Mathematics and plausible reasoning (1954)



A generating function is a clothesline on which we hang up a sequence of numbers for display.

—Herbert Wilf, Generatingfunctionology (1994)



Ordinary generating function (OGF)


The ordinary generating function of a sequence an is


G(an;x)=∑n=0∞anxn.{displaystyle G(a_{n};x)=sum _{n=0}^{infty }a_{n}x^{n}.}G(a_n;x)=sum_{n=0}^infty a_nx^n.

When the term generating function is used without qualification, it is usually taken to mean an ordinary generating function.


If an is the probability mass function of a discrete random variable, then its ordinary generating function is called a probability-generating function.


The ordinary generating function can be generalized to arrays with multiple indices. For example, the ordinary generating function of a two-dimensional array am, n (where n and m are natural numbers) is


G(am,n;x,y)=∑m,n=0∞am,nxmyn.{displaystyle G(a_{m,n};x,y)=sum _{m,n=0}^{infty }a_{m,n}x^{m}y^{n}.}G(a_{m,n};x,y)=sum_{m,n=0}^infty a_{m,n}x^my^n.


Exponential generating function (EGF)


The exponential generating function of a sequence an is


EG⁡(an;x)=∑n=0∞anxnn!.{displaystyle operatorname {EG} (a_{n};x)=sum _{n=0}^{infty }a_{n}{frac {x^{n}}{n!}}.}{displaystyle operatorname {EG} (a_{n};x)=sum _{n=0}^{infty }a_{n}{frac {x^{n}}{n!}}.}

Exponential generating functions are generally more convenient than ordinary generating functions for combinatorial enumeration problems that involve labelled objects.[3]



Poisson generating function


The Poisson generating function of a sequence an is


PG⁡(an;x)=∑n=0∞ane−xxnn!=e−xEG⁡(an;x).{displaystyle operatorname {PG} (a_{n};x)=sum _{n=0}^{infty }a_{n}e^{-x}{frac {x^{n}}{n!}}=e^{-x},operatorname {EG} (a_{n};x).}{displaystyle operatorname {PG} (a_{n};x)=sum _{n=0}^{infty }a_{n}e^{-x}{frac {x^{n}}{n!}}=e^{-x},operatorname {EG} (a_{n};x).}


Lambert series


The Lambert series of a sequence an is


LG⁡(an;x)=∑n=1∞anxn1−xn.{displaystyle operatorname {LG} (a_{n};x)=sum _{n=1}^{infty }a_{n}{frac {x^{n}}{1-x^{n}}}.}{displaystyle operatorname {LG} (a_{n};x)=sum _{n=1}^{infty }a_{n}{frac {x^{n}}{1-x^{n}}}.}

The Lambert series coefficients in the power series expansions bn:=[xn]LG⁡(an;x){displaystyle b_{n}:=[x^{n}]operatorname {LG} (a_{n};x)}{displaystyle b_{n}:=[x^{n}]operatorname {LG} (a_{n};x)} for integers n≥1{displaystyle ngeq 1}ngeq 1 are related by the divisor sum bn=∑d|nad{displaystyle b_{n}=sum _{d|n}a_{d}}{displaystyle b_{n}=sum _{d|n}a_{d}}. The main article provides several more classical, or at least well-known examples related to special arithmetic functions in number theory.
Note that in a Lambert series the index n starts at 1, not at 0, as the first term would otherwise be undefined.



Bell series


The Bell series of a sequence an is an expression in terms of both an indeterminate x and a prime p and is given by[4]


BGp⁡(an;x)=∑n=0∞apnxn.{displaystyle operatorname {BG} _{p}(a_{n};x)=sum _{n=0}^{infty }a_{p^{n}}x^{n}.}operatorname{BG}_p(a_n;x)=sum_{n=0}^infty a_{p^n}x^n.


Dirichlet series generating functions (DGFs)


Formal Dirichlet series are often classified as generating functions, although they are not strictly formal power series. The Dirichlet series generating function of a sequence an is[5]


DG⁡(an;s)=∑n=1∞anns.{displaystyle operatorname {DG} (a_{n};s)=sum _{n=1}^{infty }{frac {a_{n}}{n^{s}}}.}{displaystyle operatorname {DG} (a_{n};s)=sum _{n=1}^{infty }{frac {a_{n}}{n^{s}}}.}

The Dirichlet series generating function is especially useful when an is a multiplicative function, in which case it has an Euler product expression[6] in terms of the function's Bell series


DG⁡(an;s)=∏pBGp⁡(an;p−s).{displaystyle operatorname {DG} (a_{n};s)=prod _{p}operatorname {BG} _{p}(a_{n};p^{-s}),.}operatorname{DG}(a_n;s)=prod_{p} operatorname{BG}_p(a_n;p^{-s}),.

If an is a Dirichlet character then its Dirichlet series generating function is called a Dirichlet L-series.
We also have a relation between the pair of coefficients in the Lambert series expansions above and their DGFs. Namely, we can prove that [xn]LG⁡(an;x)=bn{displaystyle [x^{n}]operatorname {LG} (a_{n};x)=b_{n}}{displaystyle [x^{n}]operatorname {LG} (a_{n};x)=b_{n}} if and only if DG⁡(an;s)ζ(s)=DG⁡(bn;s){displaystyle operatorname {DG} (a_{n};s)zeta (s)=operatorname {DG} (b_{n};s)}{displaystyle operatorname {DG} (a_{n};s)zeta (s)=operatorname {DG} (b_{n};s)} where ζ(s){displaystyle zeta (s)}zeta (s) is the Riemann zeta function.[7]



Polynomial sequence generating functions


The idea of generating functions can be extended to sequences of other objects. Thus, for example, polynomial sequences of binomial type are generated by


exf(t)=∑n=0∞pn(x)n!tn{displaystyle e^{xf(t)}=sum _{n=0}^{infty }{frac {p_{n}(x)}{n!}}t^{n}}e^{xf(t)}=sum_{n=0}^infty frac{p_n(x)}{n!} t^n

where pn(x) is a sequence of polynomials and f(t) is a function of a certain form. Sheffer sequences are generated in a similar way. See the main article generalized Appell polynomials for more information.



Ordinary generating functions



Examples of generating functions for simple sequences


Polynomials are a special case of ordinary generating functions, corresponding to finite sequences, or equivalently sequences that vanish after a certain point. These are important in that many finite sequences can usefully be interpreted as generating functions, such as the Poincaré polynomial and others.


A key generating function is that of the constant sequence 1, 1, 1, 1, 1, 1, 1, 1, 1, ..., whose ordinary generating function is the geometric series


n=0∞xn=11−x.{displaystyle sum _{n=0}^{infty }x^{n}={frac {1}{1-x}}.}{displaystyle sum _{n=0}^{infty }x^{n}={frac {1}{1-x}}.}

The left-hand side is the Maclaurin series expansion of the right-hand side. Alternatively, the equality can be justified by multiplying the power series on the left by 1 − x, and checking that the result is the constant power series 1 (in other words, that all coefficients except the one of x0 are equal to 0). Moreover, there can be no other power series with this property. The left-hand side therefore designates the multiplicative inverse of 1 − x in the ring of power series.


Expressions for the ordinary generating function of other sequences are easily derived from this one. For instance, the substitution x → ax gives the generating function for the geometric sequence 1, a, a2, a3, ... for any constant a:


n=0∞(ax)n=11−ax.{displaystyle sum _{n=0}^{infty }(ax)^{n}={frac {1}{1-ax}}.}{displaystyle sum _{n=0}^{infty }(ax)^{n}={frac {1}{1-ax}}.}

(The equality also follows directly from the fact that the left-hand side is the Maclaurin series expansion of the right-hand side.) In particular,


n=0∞(−1)nxn=11+x.{displaystyle sum _{n=0}^{infty }(-1)^{n}x^{n}={frac {1}{1+x}}.}{displaystyle sum _{n=0}^{infty }(-1)^{n}x^{n}={frac {1}{1+x}}.}

One can also introduce regular "gaps" in the sequence by replacing x by some power of x, so for instance for the sequence 1, 0, 1, 0, 1, 0, 1, 0, .... one gets the generating function


n=0∞x2n=11−x2.{displaystyle sum _{n=0}^{infty }x^{2n}={frac {1}{1-x^{2}}}.}{displaystyle sum _{n=0}^{infty }x^{2n}={frac {1}{1-x^{2}}}.}

By squaring the initial generating function, or by finding the derivative of both sides with respect to x and making a change of running variable n → n + 1, one sees that the coefficients form the sequence 1, 2, 3, 4, 5, ..., so one has


n=0∞(n+1)xn=1(1−x)2,{displaystyle sum _{n=0}^{infty }(n+1)x^{n}={frac {1}{(1-x)^{2}}},}{displaystyle sum _{n=0}^{infty }(n+1)x^{n}={frac {1}{(1-x)^{2}}},}

and the third power has as coefficients the triangular numbers 1, 3, 6, 10, 15, 21, ... whose term n is the binomial coefficient (n+22){displaystyle {tbinom {n+2}{2}}}tbinom{n+2}2, so that


n=0∞(n+22)xn=1(1−x)3.{displaystyle sum _{n=0}^{infty }{binom {n+2}{2}}x^{n}={frac {1}{(1-x)^{3}}}.}{displaystyle sum _{n=0}^{infty }{binom {n+2}{2}}x^{n}={frac {1}{(1-x)^{3}}}.}

More generally, for any non-negative integer k and non-zero real value a, it is true that


n=0∞an(n+kk)xn=1(1−ax)k+1.{displaystyle sum _{n=0}^{infty }a^{n}{binom {n+k}{k}}x^{n}={frac {1}{(1-ax)^{k+1}}},.}{displaystyle sum _{n=0}^{infty }a^{n}{binom {n+k}{k}}x^{n}={frac {1}{(1-ax)^{k+1}}},.}

Note that, since


2(n+22)−3(n+11)+(n0)=2(n+1)(n+2)2−3(n+1)+1=n2,{displaystyle 2{binom {n+2}{2}}-3{binom {n+1}{1}}+{binom {n}{0}}=2{frac {(n+1)(n+2)}{2}}-3(n+1)+1=n^{2},}{displaystyle 2{binom {n+2}{2}}-3{binom {n+1}{1}}+{binom {n}{0}}=2{frac {(n+1)(n+2)}{2}}-3(n+1)+1=n^{2},}

one can find the ordinary generating function for the sequence 0, 1, 4, 9, 16, ... of square numbers by linear combination of binomial-coefficient generating sequences:


G(n2;x)=∑n=0∞n2xn=2(1−x)3−3(1−x)2+11−x=x(x+1)(1−x)3.{displaystyle G(n^{2};x)=sum _{n=0}^{infty }n^{2}x^{n}={frac {2}{(1-x)^{3}}}-{frac {3}{(1-x)^{2}}}+{frac {1}{1-x}}={frac {x(x+1)}{(1-x)^{3}}}.}{displaystyle G(n^{2};x)=sum _{n=0}^{infty }n^{2}x^{n}={frac {2}{(1-x)^{3}}}-{frac {3}{(1-x)^{2}}}+{frac {1}{1-x}}={frac {x(x+1)}{(1-x)^{3}}}.}

We may also expand alternately to generate this same sequence of squares as a sum of derivatives of the geometric series in the following form:


G(n2;x)=∑n=0∞n2xn=∑n=0∞n(n−1)xn+∑n=0∞nxn=x2D2[11−x]+xD[11−x]=2x2(1−x)3+x(1−x)2=x(x+1)(1−x)3.{displaystyle {begin{aligned}G(n^{2};x)&=sum _{n=0}^{infty }n^{2}x^{n}=sum _{n=0}^{infty }n(n-1)x^{n}+sum _{n=0}^{infty }nx^{n}\&=x^{2}D^{2}left[{frac {1}{1-x}}right]+xDleft[{frac {1}{1-x}}right]\&={frac {2x^{2}}{(1-x)^{3}}}+{frac {x}{(1-x)^{2}}}={frac {x(x+1)}{(1-x)^{3}}}.end{aligned}}}{displaystyle {begin{aligned}G(n^{2};x)&=sum _{n=0}^{infty }n^{2}x^{n}=sum _{n=0}^{infty }n(n-1)x^{n}+sum _{n=0}^{infty }nx^{n}\&=x^{2}D^{2}left[{frac {1}{1-x}}right]+xDleft[{frac {1}{1-x}}right]\&={frac {2x^{2}}{(1-x)^{3}}}+{frac {x}{(1-x)^{2}}}={frac {x(x+1)}{(1-x)^{3}}}.end{aligned}}}

By induction, we can similarly show for positive integers m≥1{displaystyle mgeq 1}{displaystyle mgeq 1} that
[8][9]


nm=∑j=0m{mj}n!(n−j)!,{displaystyle n^{m}=sum _{j=0}^{m}left{{begin{matrix}m\jend{matrix}}right}{frac {n!}{(n-j)!}},}{displaystyle n^{m}=sum _{j=0}^{m}left{{begin{matrix}m\jend{matrix}}right}{frac {n!}{(n-j)!}},}

where {nk}{displaystyle left{{begin{matrix}n\kend{matrix}}right}}left{{begin{matrix}n\kend{matrix}}right} denote the Stirling numbers of the second kind and where the generating function n≥0n!/(n−j)!zn=j!⋅zj/(1−z)j+1{displaystyle sum _{ngeq 0}n!/(n-j)!,z^{n}=j!cdot z^{j}/(1-z)^{j+1}}{displaystyle sum _{ngeq 0}n!/(n-j)!,z^{n}=j!cdot z^{j}/(1-z)^{j+1}}, so that we can form the analogous generating functions over the integral m{displaystyle m}m-th powers generalizing the result in the square case above. In particular, since we can write zk(1−z)k+1=∑i=0k(ki)(−1)k−i(1−z)i+1{displaystyle {frac {z^{k}}{(1-z)^{k+1}}}=sum _{i=0}^{k}{binom {k}{i}}{frac {(-1)^{k-i}}{(1-z)^{i+1}}}}{displaystyle {frac {z^{k}}{(1-z)^{k+1}}}=sum _{i=0}^{k}{binom {k}{i}}{frac {(-1)^{k-i}}{(1-z)^{i+1}}}}, we can apply a well-known finite sum identity involving the Stirling numbers to obtain that[10]


n≥0nmzn=∑j=0m{m+1j+1}(−1)m−jj!(1−z)j+1.{displaystyle sum _{ngeq 0}n^{m}z^{n}=sum _{j=0}^{m}left{{begin{matrix}m+1\j+1end{matrix}}right}{frac {(-1)^{m-j}j!}{(1-z)^{j+1}}}.}{displaystyle sum _{ngeq 0}n^{m}z^{n}=sum _{j=0}^{m}left{{begin{matrix}m+1\j+1end{matrix}}right}{frac {(-1)^{m-j}j!}{(1-z)^{j+1}}}.}


Rational functions



The ordinary generating function of a sequence can be expressed as a rational function (the ratio of two finite-degree polynomials) if and only if the sequence is a linear recursive sequence with constant coefficients; this generalizes the examples above. Conversely, every sequence generated by a fraction of polynomials satisfies a linear recurrence with constant coefficients; these coefficients are identical to the coefficients of the fraction denominator polynomial (so they can be directly read off). This observation shows it is easy to solve for generating functions of sequences defined by a linear finite difference equation with constant coefficients, and then hence, for explicit closed-form formulas for the coefficients of these generating functions. The prototypical example here is to derive Binet's formula for the Fibonacci numbers via generating function techniques.


We also notice that the class of rational generating functions precisely corresponds to the generating functions that enumerate quasi-polynomial sequences of the form [11]


fn=p1(n)ρ1n+⋯+pℓ(n)ρn,{displaystyle f_{n}=p_{1}(n)rho _{1}^{n}+cdots +p_{ell }(n)rho _{ell }^{n},}{displaystyle f_{n}=p_{1}(n)rho _{1}^{n}+cdots +p_{ell }(n)rho _{ell }^{n},}

where the reciprocal roots, ρi∈C{displaystyle rho _{i}in mathbb {C} }{displaystyle rho _{i}in mathbb {C} }, are fixed scalars and where pi(n){displaystyle p_{i}(n)}{displaystyle p_{i}(n)} is a polynomial in n{displaystyle n}n for all 1≤i≤{displaystyle 1leq ileq ell }1leq ileq ell .


In general, Hadamard products of rational functions produce rational generating functions. Similarly, if F(s,t):=∑m,n≥0f(m,n)wmzn{displaystyle F(s,t):=sum _{m,ngeq 0}f(m,n)w^{m}z^{n}}{displaystyle F(s,t):=sum _{m,ngeq 0}f(m,n)w^{m}z^{n}} is a bivariate rational generating function, then its corresponding diagonal generating function, diag⁡(F):=∑n≥0f(n,n)zn{displaystyle operatorname {diag} (F):=sum _{ngeq 0}f(n,n)z^{n}}{displaystyle operatorname {diag} (F):=sum _{ngeq 0}f(n,n)z^{n}}, is algebraic. For example, if we let [12]


F(s,t):=∑i,j≥0(i+ji)sitj=11−s−t,{displaystyle F(s,t):=sum _{i,jgeq 0}{binom {i+j}{i}}s^{i}t^{j}={frac {1}{1-s-t}},}{displaystyle F(s,t):=sum _{i,jgeq 0}{binom {i+j}{i}}s^{i}t^{j}={frac {1}{1-s-t}},}

then this generating function's diagonal coefficient generating function is given by the well-known OGF formula


diag⁡(F)=∑n≥0(2nn)zn=11−4z.{displaystyle operatorname {diag} (F)=sum _{ngeq 0}{binom {2n}{n}}z^{n}={frac {1}{sqrt {1-4z}}}.}{displaystyle operatorname {diag} (F)=sum _{ngeq 0}{binom {2n}{n}}z^{n}={frac {1}{sqrt {1-4z}}}.}

This result is computed in many ways, including Cauchy's integral formula or contour integration, taking complex residues, or by direct manipulations of formal power series in two variables.



Operations on generating functions



Multiplication yields convolution



Multiplication of ordinary generating functions yields a discrete convolution (the Cauchy product) of the sequences. For example, the sequence of cumulative sums (compare to the slightly more general Euler–Maclaurin formula)


(a0,a0+a1,a0+a1+a2,…){displaystyle (a_{0},a_{0}+a_{1},a_{0}+a_{1}+a_{2},ldots )}{displaystyle (a_{0},a_{0}+a_{1},a_{0}+a_{1}+a_{2},ldots )}

of a sequence with ordinary generating function G(anx) has the generating function


G(an;x)⋅11−x{displaystyle G(a_{n};x)cdot {frac {1}{1-x}}}G(a_n; x) cdot frac{1}{1-x}

because 1/(1 − x) is the ordinary generating function for the sequence (1, 1, ...). See also the section on convolutions in the applications section of this article below for further examples of problem solving with convolutions of generating functions and interpretations.



Shifting sequence indices


For integers m≥1{displaystyle mgeq 1}{displaystyle mgeq 1}, we have the following two analogous identities for the modified generating functions enumerating the shifted sequence variants of gn−m⟩{displaystyle langle g_{n-m}rangle }{displaystyle langle g_{n-m}rangle } and gn+m⟩{displaystyle langle g_{n+m}rangle }{displaystyle langle g_{n+m}rangle }, respectively:


zmG(z)=∑n≥mgn−mznG(z)−g0−g1z−gm−1zm−1zm=∑n≥0gn+mzn.{displaystyle {begin{aligned}z^{m}G(z)&=sum _{ngeq m}g_{n-m}z^{n}\{frac {G(z)-g_{0}-g_{1}z-cdots -g_{m-1}z^{m-1}}{z^{m}}}&=sum _{ngeq 0}g_{n+m}z^{n}.end{aligned}}}{displaystyle {begin{aligned}z^{m}G(z)&=sum _{ngeq m}g_{n-m}z^{n}\{frac {G(z)-g_{0}-g_{1}z-cdots -g_{m-1}z^{m-1}}{z^{m}}}&=sum _{ngeq 0}g_{n+m}z^{n}.end{aligned}}}


Differentiation and integration of generating functions


We have the following respective power series expansions for the first derivative of a generating function and its integral:


G′(z)=∑n≥0(n+1)gn+1znz⋅G′(z)=∑n≥0ngnzn∫0zG(t)dt=∑n≥1gn−1nzn.{displaystyle {begin{aligned}G^{prime }(z)&=sum _{ngeq 0}(n+1)g_{n+1}z^{n}\zcdot G^{prime }(z)&=sum _{ngeq 0}ng_{n}z^{n}\int _{0}^{z}G(t),dt&=sum _{ngeq 1}{frac {g_{n-1}}{n}}z^{n}.end{aligned}}}{displaystyle {begin{aligned}G^{prime }(z)&=sum _{ngeq 0}(n+1)g_{n+1}z^{n}\zcdot G^{prime }(z)&=sum _{ngeq 0}ng_{n}z^{n}\int _{0}^{z}G(t),dt&=sum _{ngeq 1}{frac {g_{n-1}}{n}}z^{n}.end{aligned}}}

The differentiation–multiplication operation of the second identity can be repeated k{displaystyle k}k times to multiply the sequence by nk{displaystyle n^{k}}n^{k}, but that requires alternating between differentiation and multiplication. If instead doing k{displaystyle k}k differentiations in sequence, the effect is to multiply by the k{displaystyle k}kthfalling factorial:


zkG(k)(z)=∑n≥0nk_gnzn=∑n≥0n(n−1)⋯(n−k+1)gnzn for all k∈N.{displaystyle z^{k}G^{(k)}(z)=sum _{ngeq 0}n^{underline {k}}g_{n}z^{n}=sum _{ngeq 0}n(n-1)dotsb (n-k+1)g_{n}z^{n}{text{ for all }}kin mathbb {N} .}{displaystyle z^{k}G^{(k)}(z)=sum _{ngeq 0}n^{underline {k}}g_{n}z^{n}=sum _{ngeq 0}n(n-1)dotsb (n-k+1)g_{n}z^{n}{text{ for all }}kin mathbb {N} .}

Using the Stirling numbers of the second kind, that can be turned into another formula for multiplying by nk{displaystyle n^{k}}n^{k} as follows (see the main article on generating function transformations):


j=0k{kj}zjF(j)(z)=∑n≥0nkfnzn for all k∈N.{displaystyle sum _{j=0}^{k}left{{begin{matrix}k\jend{matrix}}right}z^{j}F^{(j)}(z)=sum _{ngeq 0}n^{k}f_{n}z^{n}{text{ for all }}kin mathbb {N} .}{displaystyle sum _{j=0}^{k}left{{begin{matrix}k\jend{matrix}}right}z^{j}F^{(j)}(z)=sum _{ngeq 0}n^{k}f_{n}z^{n}{text{ for all }}kin mathbb {N} .}

A negative-order reversal of this sequence powers formula corresponding to the operation of repeated integration is defined by the zeta series transformation and its generalizations defined as a derivative-based transformation of generating functions, or alternately termwise by an performing an integral transformation on the sequence generating function. Related operations of performing fractional integration on a sequence generating function are discussed here.



Enumerating arithmetic progressions of sequences


In this section we give formulas for generating functions enumerating the sequence {fan+b}{displaystyle {f_{an+b}}}{displaystyle {f_{an+b}}} given an ordinary generating function F(z){displaystyle F(z)}{displaystyle F(z)} where a,b∈N{displaystyle a,bin mathbb {N} }{displaystyle a,bin mathbb {N} }, a≥2{displaystyle ageq 2}{displaystyle ageq 2}, and 0≤b<a{displaystyle 0leq b<a}{displaystyle 0leq b<a} (see the main article on transformations). For a=2{displaystyle a=2}{displaystyle a=2}, this is simply the familiar decomposition of a function into even and odd parts (i.e., even and odd powers):



n≥0f2nz2n=12(F(z)+F(−z)){displaystyle sum _{ngeq 0}f_{2n}z^{2n}={frac {1}{2}}left(F(z)+F(-z)right)}{displaystyle sum _{ngeq 0}f_{2n}z^{2n}={frac {1}{2}}left(F(z)+F(-z)right)}

n≥0f2n+1z2n+1=12(F(z)−F(−z)).{displaystyle sum _{ngeq 0}f_{2n+1}z^{2n+1}={frac {1}{2}}left(F(z)-F(-z)right).}{displaystyle sum _{ngeq 0}f_{2n+1}z^{2n+1}={frac {1}{2}}left(F(z)-F(-z)right).}


More generally, suppose that a≥3{displaystyle ageq 3}{displaystyle ageq 3} and that ωa=exp⁡(2πı/a){displaystyle omega _{a}=exp left(2pi imath /aright)}{displaystyle omega _{a}=exp left(2pi imath /aright)} denotes the a{displaystyle a}athprimitive root of unity. Then, as an application of the discrete Fourier transform, we have the formula[13]


n≥0fan+bzan+b=1a∑m=0a−a−mbF(ωamz).{displaystyle sum _{ngeq 0}f_{an+b}z^{an+b}={frac {1}{a}}sum _{m=0}^{a-1}omega _{a}^{-mb}Fleft(omega _{a}^{m}zright).}{displaystyle sum _{ngeq 0}f_{an+b}z^{an+b}={frac {1}{a}}sum _{m=0}^{a-1}omega _{a}^{-mb}Fleft(omega _{a}^{m}zright).}

For integers m≥1{displaystyle mgeq 1}{displaystyle mgeq 1}, another useful formula providing somewhat reversed floored arithmetic progressions — effectively repeating each coefficient m{displaystyle m}m times — are generated by the identity[14]


n≥0f⌊nm⌋zn=1−zm1−zF(zm)=(1+z+⋯+zm−2+zm−1)F(zm).{displaystyle sum _{ngeq 0}f_{lfloor {frac {n}{m}}rfloor }z^{n}={frac {1-z^{m}}{1-z}}F(z^{m})=left(1+z+cdots +z^{m-2}+z^{m-1}right)F(z^{m}).}{displaystyle sum _{ngeq 0}f_{lfloor {frac {n}{m}}rfloor }z^{n}={frac {1-z^{m}}{1-z}}F(z^{m})=left(1+z+cdots +z^{m-2}+z^{m-1}right)F(z^{m}).}


P-recursive sequences and holonomic generating functions



Definitions


A formal power series (or function) F(z){displaystyle F(z)}{displaystyle F(z)} is said to be holonomic if it satisfies a linear differential equation of the form [15]


c0(z)F(r)(z)+c1(z)F(r−1)(z)+⋯+cr(z)F(z)=0,{displaystyle c_{0}(z)F^{(r)}(z)+c_{1}(z)F^{(r-1)}(z)+cdots +c_{r}(z)F(z)=0,}{displaystyle c_{0}(z)F^{(r)}(z)+c_{1}(z)F^{(r-1)}(z)+cdots +c_{r}(z)F(z)=0,}

where the coefficients ci(z){displaystyle c_{i}(z)}{displaystyle c_{i}(z)} are in the field of rational functions, C(z){displaystyle mathbb {C} (z)}{displaystyle mathbb {C} (z)}. Equivalently, F(z){displaystyle F(z)}{displaystyle F(z)} is holonomic if the vector space over C(z){displaystyle mathbb {C} (z)}{displaystyle mathbb {C} (z)} spanned by the set of all of its derivatives is finite dimensional.


Since we can clear denominators if need be in the previous equation, we may assume that the functions, ci(z){displaystyle c_{i}(z)}{displaystyle c_{i}(z)} are polynomials in z{displaystyle z}z. Thus we can see an equivalent condition that a generating function is holonomic if its coefficients satisfy a P-recurrence of the form


c^s(n)fn+s+c^s−1(n)fn+s−1+⋯+c^0(n)fn=0,{displaystyle {widehat {c}}_{s}(n)f_{n+s}+{widehat {c}}_{s-1}(n)f_{n+s-1}+cdots +{widehat {c}}_{0}(n)f_{n}=0,}{displaystyle {widehat {c}}_{s}(n)f_{n+s}+{widehat {c}}_{s-1}(n)f_{n+s-1}+cdots +{widehat {c}}_{0}(n)f_{n}=0,}

for all large enough n≥n0{displaystyle ngeq n_{0}}n geq n_0 and where the c^i(n){displaystyle {widehat {c}}_{i}(n)}{displaystyle {widehat {c}}_{i}(n)} are fixed finite-degree polynomials in n{displaystyle n}n. In other words, the properties that a sequence be P-recursive and have a holonomic generating function are equivalent. Holonomic functions are closed under the Hadamard product operation {displaystyle odot }odot on generating functions.



Examples


The functions ez{displaystyle e^{z}}e^{z}, log⁡(z){displaystyle log(z)}log(z), cos⁡(z){displaystyle cos(z)}{displaystyle cos(z)}, arcsin⁡(z){displaystyle arcsin(z)}arcsin(z), 1+z{displaystyle {sqrt {1+z}}}{displaystyle {sqrt {1+z}}}, the dilogarithm function Li2⁡(z){displaystyle operatorname {Li} _{2}(z)}{displaystyle operatorname {Li} _{2}(z)}, the generalized hypergeometric functions pFq(...;...;z){displaystyle _{p}F_{q}(...;...;z)}{displaystyle _{p}F_{q}(...;...;z)} and the functions defined by the power series n≥0zn/(n!)2{displaystyle sum _{ngeq 0}z^{n}/(n!)^{2}}{displaystyle sum _{ngeq 0}z^{n}/(n!)^{2}} and the non-convergent n≥0n!⋅zn{displaystyle sum _{ngeq 0}n!cdot z^{n}}{displaystyle sum _{ngeq 0}n!cdot z^{n}} are all holonomic. Examples of P-recursive sequences with holonomic generating functions include fn:=1n+1(2nn){displaystyle f_{n}:={frac {1}{n+1}}{binom {2n}{n}}}{displaystyle f_{n}:={frac {1}{n+1}}{binom {2n}{n}}} and fn:=2n/(n2+1){displaystyle f_{n}:=2^{n}/(n^{2}+1)}{displaystyle f_{n}:=2^{n}/(n^{2}+1)}, where sequences such as n{displaystyle {sqrt {n}}}{sqrt {n}} and log⁡(n){displaystyle log(n)}log(n) are not P-recursive due to the nature of singularities in their corresponding generating functions. Similarly, functions with infinitely-many singularities such as tan⁡(z){displaystyle tan(z)}tan(z), sec⁡(z){displaystyle sec(z)}{displaystyle sec(z)}, and Γ(z){displaystyle Gamma (z)}Gamma (z) are not holonomic functions.



Software for working with P-recursive sequences and holonomic generating functions


Tools for processing and working with P-recursive sequences in Mathematica include the software packages provided for non-commercial use on the RISC Combinatorics Group algorithmic combinatorics software site. Despite being mostly closed-source, particularly powerful tools in this software suite are provided by the Guess package for guessing P-recurrences for arbitrary input sequences (useful for experimental mathematics and exploration) and the Sigma package which is able to find P-recurrences for many sums and solve for closed-form solutions to P-recurrences involving generalized harmonic numbers.[16] Other packages listed on this particular RISC site are targeted at working with holonomic generating functions specifically.
(Depending on how in depth this article gets on the topic, there are many, many other examples of useful software tools that can be listed here or on this page in another section.)



Relation to discrete-time Fourier transform



When the series converges absolutely,


G(an;e−)=∑n=0∞ane−n{displaystyle Gleft(a_{n};e^{-iomega }right)=sum _{n=0}^{infty }a_{n}e^{-iomega n}}G left ( a_n; e^{-i omega} right) = sum_{n=0}^infty a_n e^{-i omega n}

is the discrete-time Fourier transform of the sequence a0a1, ....



Asymptotic growth of a sequence


In calculus, often the growth rate of the coefficients of a power series can be used to deduce a radius of convergence for the power series. The reverse can also hold; often the radius of convergence for a generating function can be used to deduce the asymptotic growth of the underlying sequence.


For instance, if an ordinary generating function G(anx) that has a finite radius of convergence of r can be written as


G(an;x)=A(x)+B(x)(1−xr)−β{displaystyle G(a_{n};x)={frac {A(x)+B(x)left(1-{frac {x}{r}}right)^{-beta }}{x^{alpha }}}}G(a_n; x) = frac{A(x) + B(x) left (1- frac{x}{r} right )^{-beta}}{x^{alpha}}

where each of A(x) and B(x) is a function that is analytic to a radius of convergence greater than r (or is entire), and where B(r) ≠ 0 then


an∼B(r)rαΓ)nβ1(1/r)n∼B(r)rα(n+β1n)(1/r)n=B(r)rα((βn))(1/r)n,{displaystyle a_{n}sim {frac {B(r)}{r^{alpha }Gamma (beta )}},n^{beta -1}(1/r)^{n}sim {frac {B(r)}{r^{alpha }}}{binom {n+beta -1}{n}}(1/r)^{n}={frac {B(r)}{r^{alpha }}}left(!!{binom {beta }{n}}!!right)(1/r)^{n},,}{displaystyle a_{n}sim {frac {B(r)}{r^{alpha }Gamma (beta )}},n^{beta -1}(1/r)^{n}sim {frac {B(r)}{r^{alpha }}}{binom {n+beta -1}{n}}(1/r)^{n}={frac {B(r)}{r^{alpha }}}left(!!{binom {beta }{n}}!!right)(1/r)^{n},,}

using the Gamma function, a binomial coefficient, or a multiset coefficient.


Often this approach can be iterated to generate several terms in an asymptotic series for an. In particular,


G(an−B(r)rα(n+β1n)(1/r)n;x)=G(an;x)−B(r)rα(1−xr)−β.{displaystyle Gleft(a_{n}-{frac {B(r)}{r^{alpha }}}{binom {n+beta -1}{n}}(1/r)^{n};xright)=G(a_{n};x)-{frac {B(r)}{r^{alpha }}}left(1-{frac {x}{r}}right)^{-beta },.}{displaystyle Gleft(a_{n}-{frac {B(r)}{r^{alpha }}}{binom {n+beta -1}{n}}(1/r)^{n};xright)=G(a_{n};x)-{frac {B(r)}{r^{alpha }}}left(1-{frac {x}{r}}right)^{-beta },.}

The asymptotic growth of the coefficients of this generating function can then be sought via the finding of A, B, α, β, and r to describe the generating function, as above.


Similar asymptotic analysis is possible for exponential generating functions. With an exponential generating function, it is an/n! that grows according to these asymptotic formulae.



Asymptotic growth of the sequence of squares


As derived above, the ordinary generating function for the sequence of squares is


x(x+1)(1−x)3.{displaystyle {frac {x(x+1)}{(1-x)^{3}}}.}frac{x(x+1)}{(1-x)^3}.

With r = 1, α = 0, β = 3, A(x) = 0, and B(x) = x(x+1), we can verify that the squares grow as expected, like the squares:


an∼B(r)rαΓ)nβ1(1r)n=1(1+1)10Γ(3)n3−1(1/1)n=n2.{displaystyle a_{n}sim {frac {B(r)}{r^{alpha }Gamma (beta )}},n^{beta -1}left({frac {1}{r}}right)^{n}={frac {1(1+1)}{1^{0},Gamma (3)}},n^{3-1}(1/1)^{n}=n^{2}.}a_n sim frac{B(r)}{r^{alpha} Gamma(beta)} , n^{beta-1} left (frac{1}{r} right )^{n} = frac{1(1+1)}{1^0,Gamma(3)},n^{3-1} (1/1)^n = n^2.


Asymptotic growth of the Catalan numbers



The ordinary generating function for the Catalan numbers is


1−1−4x2x.{displaystyle {frac {1-{sqrt {1-4x}}}{2x}}.}frac{1-sqrt{1-4x}}{2x}.

With r = 1/4, α = 1, β = −1/2, A(x) = 1/2, and B(x) = −1/2, we can conclude that, for the Catalan numbers,


an∼B(r)rαΓ)nβ1(1r)n=−12(14)1Γ(−12)n−12−1(114)n=1πn−324n.{displaystyle a_{n}sim {frac {B(r)}{r^{alpha }Gamma (beta )}},n^{beta -1}left({frac {1}{r}}right)^{n}={frac {-{frac {1}{2}}}{({frac {1}{4}})^{1}Gamma (-{frac {1}{2}})}},n^{-{frac {1}{2}}-1}left({frac {1}{frac {1}{4}}}right)^{n}={frac {1}{sqrt {pi }}}n^{-{frac {3}{2}}},4^{n}.}a_{n}sim {frac  {B(r)}{r^{{alpha }}Gamma (beta )}},n^{{beta -1}}left({frac  {1}{r}}right)^{{n}}={frac  {-{frac  {1}{2}}}{({frac  {1}{4}})^{1}Gamma (-{frac  {1}{2}})}},n^{{-{frac  {1}{2}}-1}}left({frac  {1}{{frac  {1}{4}}}}right)^{n}={frac  {1}{{sqrt  {pi }}}}n^{{-{frac  {3}{2}}}},4^{n}.


Bivariate and multivariate generating functions


One can define generating functions in several variables for arrays with several indices. These are called multivariate generating functions or, sometimes, super generating functions. For two variables, these are often called bivariate generating functions.


For instance, since (1+x)n{displaystyle (1+x)^{n}}(1+x)^n is the ordinary generating function for binomial coefficients for a fixed n, one may ask for a bivariate generating function that generates the binomial coefficients (nk){displaystyle {binom {n}{k}}}{binom {n}{k}} for all k and n. To do this, consider (1+x)n{displaystyle (1+x)^{n}}(1+x)^n as itself a series, in n, and find the generating function in y that has these as coefficients. Since the generating function for an{displaystyle a^{n}}a^{n} is


11−ay,{displaystyle {frac {1}{1-ay}},}frac{1}{1-ay},

the generating function for the binomial coefficients is:


n,k(nk)xkyn=11−(1+x)y=11−y−xy.{displaystyle sum _{n,k}{binom {n}{k}}x^{k}y^{n}={frac {1}{1-(1+x)y}}={frac {1}{1-y-xy}}.}sum_{n,k} binom{n}{k} x^k y^n = frac{1}{1-(1+x)y}=frac{1}{1-y-xy}.


Representation by continued fractions (Jacobi-type J-fractions)



Definitions


Expansions of (formal) Jacobi-type and Stieltjes-type continued fractions (J-fractions and S-fractions, respectively) whose hth{displaystyle h^{th}}{displaystyle h^{th}} rational convergents represent 2h{displaystyle 2h}2h-order accurate power series are another way to express the typically divergent ordinary generating functions for many special one and two-variate sequences. The particular form of the Jacobi-type continued fractions (J-fractions) are expanded as in the following equation and have the next corresponding power series expansions with respect to z{displaystyle z}z for some specific, application-dependent component sequences, {abi}{displaystyle {{text{ab}}_{i}}}{displaystyle {{text{ab}}_{i}}} and {ci}{displaystyle {c_{i}}}{displaystyle {c_{i}}}, where z≠0{displaystyle zneq 0}{displaystyle zneq 0} denotes the formal variable in the second power series expansion given below:[17]


J[∞](z)=11−c1z−ab2z21−c2z−ab3z2⋱=1+c1z+(ab2+c12)z2+(2ab2c1+c13+ab2c2)z3+⋯.{displaystyle {begin{aligned}J^{[infty ]}(z)&={cfrac {1}{1-c_{1}z-{cfrac {{text{ab}}_{2}z^{2}}{1-c_{2}z-{cfrac {{text{ab}}_{3}z^{2}}{ddots }}}}}}\&=1+c_{1}z+left({text{ab}}_{2}+c_{1}^{2}right)z^{2}+left(2{text{ab}}_{2}c_{1}+c_{1}^{3}+{text{ab}}_{2}c_{2}right)z^{3}+cdots .end{aligned}}}{displaystyle {begin{aligned}J^{[infty ]}(z)&={cfrac {1}{1-c_{1}z-{cfrac {{text{ab}}_{2}z^{2}}{1-c_{2}z-{cfrac {{text{ab}}_{3}z^{2}}{ddots }}}}}}\&=1+c_{1}z+left({text{ab}}_{2}+c_{1}^{2}right)z^{2}+left(2{text{ab}}_{2}c_{1}+c_{1}^{3}+{text{ab}}_{2}c_{2}right)z^{3}+cdots .end{aligned}}}

The coefficients of zn{displaystyle z^{n}}z^n, denoted in shorthand by jn:=[zn]J[∞](z){displaystyle j_{n}:=[z^{n}]J^{[infty ]}(z)}{displaystyle j_{n}:=[z^{n}]J^{[infty ]}(z)}, in the previous equations correspond to matrix solutions of the equations


[k0,1k1,100⋯k0,2k1,2k2,20⋯k0,3k1,3k2,3k3,3⋯]=[k0,0000⋯k0,1k1,100⋯k0,2k1,2k2,20⋯]⋅[c1100⋯ab2c210⋯0ab3c31⋯],{displaystyle {begin{bmatrix}k_{0,1}&k_{1,1}&0&0&cdots \k_{0,2}&k_{1,2}&k_{2,2}&0&cdots \k_{0,3}&k_{1,3}&k_{2,3}&k_{3,3}&cdots \vdots &vdots &vdots &vdots end{bmatrix}}={begin{bmatrix}k_{0,0}&0&0&0&cdots \k_{0,1}&k_{1,1}&0&0&cdots \k_{0,2}&k_{1,2}&k_{2,2}&0&cdots \vdots &vdots &vdots &vdots end{bmatrix}}cdot {begin{bmatrix}c_{1}&1&0&0&cdots \{text{ab}}_{2}&c_{2}&1&0&cdots \0&{text{ab}}_{3}&c_{3}&1&cdots \vdots &vdots &vdots &vdots end{bmatrix}},}{displaystyle {begin{bmatrix}k_{0,1}&k_{1,1}&0&0&cdots \k_{0,2}&k_{1,2}&k_{2,2}&0&cdots \k_{0,3}&k_{1,3}&k_{2,3}&k_{3,3}&cdots \vdots &vdots &vdots &vdots end{bmatrix}}={begin{bmatrix}k_{0,0}&0&0&0&cdots \k_{0,1}&k_{1,1}&0&0&cdots \k_{0,2}&k_{1,2}&k_{2,2}&0&cdots \vdots &vdots &vdots &vdots end{bmatrix}}cdot {begin{bmatrix}c_{1}&1&0&0&cdots \{text{ab}}_{2}&c_{2}&1&0&cdots \0&{text{ab}}_{3}&c_{3}&1&cdots \vdots &vdots &vdots &vdots end{bmatrix}},}

where j0≡k0,0=1{displaystyle j_{0}equiv k_{0,0}=1}{displaystyle j_{0}equiv k_{0,0}=1}, jn=k0,n{displaystyle j_{n}=k_{0,n}}{displaystyle j_{n}=k_{0,n}} for n≥1{displaystyle ngeq 1}ngeq 1, kr,s=0{displaystyle k_{r,s}=0}{displaystyle k_{r,s}=0} if r>s{displaystyle r>s}{displaystyle r>s}, and where for all integers p,q≥0{displaystyle p,qgeq 0}{displaystyle p,qgeq 0}, we have an addition formula relation given by


jp+q=k0,p⋅k0,q+∑i=1min(p,q)ab2⋯abi+1×ki,p⋅ki,q.{displaystyle j_{p+q}=k_{0,p}cdot k_{0,q}+sum _{i=1}^{min(p,q)}{text{ab}}_{2}cdots {text{ab}}_{i+1}times k_{i,p}cdot k_{i,q}.}{displaystyle j_{p+q}=k_{0,p}cdot k_{0,q}+sum _{i=1}^{min(p,q)}{text{ab}}_{2}cdots {text{ab}}_{i+1}times k_{i,p}cdot k_{i,q}.}


Properties of the hth convergent functions


For h≥0{displaystyle hgeq 0}{displaystyle hgeq 0} (though in practice when h≥2{displaystyle hgeq 2}{displaystyle hgeq 2}), we can define the rational hth{displaystyle h^{th}}{displaystyle h^{th}} convergents to the infinite J-fraction, J[∞](z){displaystyle J^{[infty ]}(z)}{displaystyle J^{[infty ]}(z)}, expanded by



Convh(z):=Ph(z)Qh(z)=j0+j1z+⋯+j2h−1z2h−1+∑n≥2hj~h,nzn{displaystyle {text{Conv}}_{h}(z):={frac {P_{h}(z)}{Q_{h}(z)}}=j_{0}+j_{1}z+cdots +j_{2h-1}z^{2h-1}+sum _{ngeq 2h}{widetilde {j}}_{h,n}z^{n}}{displaystyle {text{Conv}}_{h}(z):={frac {P_{h}(z)}{Q_{h}(z)}}=j_{0}+j_{1}z+cdots +j_{2h-1}z^{2h-1}+sum _{ngeq 2h}{widetilde {j}}_{h,n}z^{n}},

component-wise through the sequences, Ph(z){displaystyle P_{h}(z)}{displaystyle P_{h}(z)} and Qh(z){displaystyle Q_{h}(z)}{displaystyle Q_{h}(z)}, defined recursively by


Ph(z)=(1−chz)Ph−1(z)−abhz2Ph−2(z)+δh,1Qh(z)=(1−chz)Qh−1(z)−abhz2Qh−2(z)+(1−c1z)δh,1+δ0,1.{displaystyle {begin{aligned}P_{h}(z)&=(1-c_{h}z)P_{h-1}(z)-{text{ab}}_{h}z^{2}P_{h-2}(z)+delta _{h,1}\Q_{h}(z)&=(1-c_{h}z)Q_{h-1}(z)-{text{ab}}_{h}z^{2}Q_{h-2}(z)+(1-c_{1}z)delta _{h,1}+delta _{0,1}.end{aligned}}}{displaystyle {begin{aligned}P_{h}(z)&=(1-c_{h}z)P_{h-1}(z)-{text{ab}}_{h}z^{2}P_{h-2}(z)+delta _{h,1}\Q_{h}(z)&=(1-c_{h}z)Q_{h-1}(z)-{text{ab}}_{h}z^{2}Q_{h-2}(z)+(1-c_{1}z)delta _{h,1}+delta _{0,1}.end{aligned}}}

Moreover, the rationality of the convergent function, Convh(z){displaystyle {text{Conv}}_{h}(z)}{displaystyle {text{Conv}}_{h}(z)} for all h≥2{displaystyle hgeq 2}{displaystyle hgeq 2} implies additional finite difference equations and congruence properties satisfied by the sequence of jn{displaystyle j_{n}}{displaystyle j_{n}}, and for Mh:=ab2⋯abh+1{displaystyle M_{h}:={text{ab}}_{2}cdots {text{ab}}_{h+1}}{displaystyle M_{h}:={text{ab}}_{2}cdots {text{ab}}_{h+1}} if h|Mh{displaystyle h|M_{h}}{displaystyle h|M_{h}} then we have the congruence


jn≡[zn]Convh(z)(modh),{displaystyle j_{n}equiv [z^{n}]{text{Conv}}_{h}(z){pmod {h}},}{displaystyle j_{n}equiv [z^{n}]{text{Conv}}_{h}(z){pmod {h}},}

for non-symbolic, determinate choices of the parameter sequences, {abi}{displaystyle {{text{ab}}_{i}}}{displaystyle {{text{ab}}_{i}}} and {ci}{displaystyle {c_{i}}}{displaystyle {c_{i}}}, when h≥2{displaystyle hgeq 2}{displaystyle hgeq 2}, i.e., when these sequences do not implicitly depend on an auxiliary parameter such as q{displaystyle q}q, x{displaystyle x}x, or R{displaystyle R}R as in the examples contained in the table below.



Examples


The next table provides examples of closed-form formulas for the component sequences found computationally (and subsequently proved correct in the cited references [18])
in several special cases of the prescribed sequences, jn{displaystyle j_{n}}{displaystyle j_{n}}, generated by the general expansions of the J-fractions defined in the first subsection. Here we define 0<|a|,|b|,|q|<1{displaystyle 0<|a|,|b|,|q|<1}{displaystyle 0<|a|,|b|,|q|<1} and the parameters R{displaystyle R}R, αZ+{displaystyle alpha in mathbb {Z} ^{+}}{displaystyle alpha in mathbb {Z} ^{+}} and x{displaystyle x}x to be indeterminates with respect to these expansions, where the prescribed sequences enumerated by the expansions of these J-fractions are defined in terms of the q-Pochhammer symbol, Pochhammer symbol, and the binomial coefficients.



















































jn{displaystyle j_{n}}{displaystyle j_{n}} c1{displaystyle c_{1}}c_{1} ci(i≥2){displaystyle c_{i}(igeq 2)}{displaystyle c_{i}(igeq 2)}
abi(i≥2){displaystyle {text{ab}}_{i}(igeq 2)}{displaystyle {text{ab}}_{i}(igeq 2)}
qn2{displaystyle q^{n^{2}}}{displaystyle q^{n^{2}}} q{displaystyle q}q q2h−3(q2h+q2h−2−1){displaystyle q^{2h-3}left(q^{2h}+q^{2h-2}-1right)}{displaystyle q^{2h-3}left(q^{2h}+q^{2h-2}-1right)}
q6h−10(q2h−2−1){displaystyle q^{6h-10}left(q^{2h-2}-1right)}{displaystyle q^{6h-10}left(q^{2h-2}-1right)}
(a;q)n{displaystyle (a;q)_{n}}{displaystyle (a;q)_{n}} 1−a{displaystyle 1-a}1-a qh−1−aqh−2(qh+qh−1−1){displaystyle q^{h-1}-aq^{h-2}left(q^{h}+q^{h-1}-1right)}{displaystyle q^{h-1}-aq^{h-2}left(q^{h}+q^{h-1}-1right)}
aq2h−4(aqh−2−1)(qh−1−1){displaystyle aq^{2h-4}(aq^{h-2}-1)(q^{h-1}-1)}{displaystyle aq^{2h-4}(aq^{h-2}-1)(q^{h-1}-1)}
(zq−n;q)n{displaystyle left(zq^{-n};qright)_{n}}{displaystyle left(zq^{-n};qright)_{n}} q−zq{displaystyle {frac {q-z}{q}}}{displaystyle {frac {q-z}{q}}} qh−z−qz+qhzq2h−1{displaystyle {frac {q^{h}-z-qz+q^{h}z}{q^{2h-1}}}}{displaystyle {frac {q^{h}-z-qz+q^{h}z}{q^{2h-1}}}}
(qh−1−1)(qh−1−z)⋅zq4h−5{displaystyle {frac {(q^{h-1}-1)(q^{h-1}-z)cdot z}{q^{4h-5}}}}{displaystyle {frac {(q^{h-1}-1)(q^{h-1}-z)cdot z}{q^{4h-5}}}}
(a;q)n(b;q)n{displaystyle {frac {(a;q)_{n}}{(b;q)_{n}}}}{displaystyle {frac {(a;q)_{n}}{(b;q)_{n}}}} 1−a1−b{displaystyle {frac {1-a}{1-b}}}{displaystyle {frac {1-a}{1-b}}} qi−2(q+abq2i−3+a(1−qi−1−qi)+b(qi−q−1))(1−bq2i−4)(1−bq2i−2){displaystyle {frac {q^{i-2}left(q+abq^{2i-3}+a(1-q^{i-1}-q^{i})+b(q^{i}-q-1)right)}{(1-bq^{2i-4})(1-bq^{2i-2})}}}{displaystyle {frac {q^{i-2}left(q+abq^{2i-3}+a(1-q^{i-1}-q^{i})+b(q^{i}-q-1)right)}{(1-bq^{2i-4})(1-bq^{2i-2})}}}
q2i−4(1−bqi−3)(1−aqi−2)(a−bqi−2)(1−qi−1)(1−bq2i−5)(1−bq2i−4)2(1−bq2i−3){displaystyle {frac {q^{2i-4}(1-bq^{i-3})(1-aq^{i-2})(a-bq^{i-2})(1-q^{i-1})}{(1-bq^{2i-5})(1-bq^{2i-4})^{2}(1-bq^{2i-3})}}}{displaystyle {frac {q^{2i-4}(1-bq^{i-3})(1-aq^{i-2})(a-bq^{i-2})(1-q^{i-1})}{(1-bq^{2i-5})(1-bq^{2i-4})^{2}(1-bq^{2i-3})}}}
αn⋅(Rα)n{displaystyle alpha ^{n}cdot left({frac {R}{alpha }}right)_{n}}{displaystyle alpha ^{n}cdot left({frac {R}{alpha }}right)_{n}} R{displaystyle R}R R+2α(i−1){displaystyle R+2alpha (i-1)}{displaystyle R+2alpha (i-1)}
(i−1)α(R+(i−2)α){displaystyle (i-1)alpha (R+(i-2)alpha )}{displaystyle (i-1)alpha (R+(i-2)alpha )}
(−1)n(xn){displaystyle (-1)^{n}{binom {x}{n}}}{displaystyle (-1)^{n}{binom {x}{n}}} x{displaystyle -x}-x (x+2(i−1)2)(2i−1)(2i−3){displaystyle -{frac {(x+2(i-1)^{2})}{(2i-1)(2i-3)}}}{displaystyle -{frac {(x+2(i-1)^{2})}{(2i-1)(2i-3)}}}
 {−(x−i+2)(x+i−1)4⋅(2i−3)2i≥3;−12x(x+1)i=2.{displaystyle {begin{cases}-{frac {(x-i+2)(x+i-1)}{4cdot (2i-3)^{2}}}&igeq 3;\-{frac {1}{2}}x(x+1)&i=2.end{cases}}}{displaystyle {begin{cases}-{frac {(x-i+2)(x+i-1)}{4cdot (2i-3)^{2}}}&igeq 3;\-{frac {1}{2}}x(x+1)&i=2.end{cases}}}

(−1)n(x+nn){displaystyle (-1)^{n}{binom {x+n}{n}}}{displaystyle (-1)^{n}{binom {x+n}{n}}} (x+1){displaystyle -(x+1)}{displaystyle -(x+1)} (x−2i(i−2)−1)(2i−1)(2i−3){displaystyle {frac {(x-2i(i-2)-1)}{(2i-1)(2i-3)}}}{displaystyle {frac {(x-2i(i-2)-1)}{(2i-1)(2i-3)}}}
 {−(x−i+2)(x+i−1)4⋅(2i−3)2i≥3;−12x(x+1)i=2.{displaystyle {begin{cases}-{frac {(x-i+2)(x+i-1)}{4cdot (2i-3)^{2}}}&igeq 3;\-{frac {1}{2}}x(x+1)&i=2.end{cases}}}{displaystyle {begin{cases}-{frac {(x-i+2)(x+i-1)}{4cdot (2i-3)^{2}}}&igeq 3;\-{frac {1}{2}}x(x+1)&i=2.end{cases}}}


Note that the radii of convergence of these series corresponding to the definition of the Jacobi-type J-fractions given above are in general different from that of the corresponding power series expansions defining the ordinary generating functions of these sequences.



Examples



Generating functions for the sequence of square numbers an = n2 are:



Ordinary generating function


G(n2;x)=∑n=0∞n2xn=x(x+1)(1−x)3{displaystyle G(n^{2};x)=sum _{n=0}^{infty }n^{2}x^{n}={frac {x(x+1)}{(1-x)^{3}}}}{displaystyle G(n^{2};x)=sum _{n=0}^{infty }n^{2}x^{n}={frac {x(x+1)}{(1-x)^{3}}}}


Exponential generating function


EG⁡(n2;x)=∑n=0∞n2xnn!=x(x+1)ex{displaystyle operatorname {EG} (n^{2};x)=sum _{n=0}^{infty }{frac {n^{2}x^{n}}{n!}}=x(x+1)e^{x}}{displaystyle operatorname {EG} (n^{2};x)=sum _{n=0}^{infty }{frac {n^{2}x^{n}}{n!}}=x(x+1)e^{x}}


Lambert series


As an example of a Lambert series identity not given in the main article, we can show that for |x|,|xq|<1{displaystyle |x|,|xq|<1}{displaystyle |x|,|xq|<1} we have that [19]


n≥1qnxn1−xn=∑n≥1qnxn21−qxn+∑n≥1qnxn(n+1)1−xn,{displaystyle sum _{ngeq 1}{frac {q^{n}x^{n}}{1-x^{n}}}=sum _{ngeq 1}{frac {q^{n}x^{n^{2}}}{1-qx^{n}}}+sum _{ngeq 1}{frac {q^{n}x^{n(n+1)}}{1-x^{n}}},}{displaystyle sum _{ngeq 1}{frac {q^{n}x^{n}}{1-x^{n}}}=sum _{ngeq 1}{frac {q^{n}x^{n^{2}}}{1-qx^{n}}}+sum _{ngeq 1}{frac {q^{n}x^{n(n+1)}}{1-x^{n}}},}

where we have the special case identity for the generating function of the divisor function, d(n)≡σ0(n){displaystyle d(n)equiv sigma _{0}(n)}{displaystyle d(n)equiv sigma _{0}(n)}, given by


n≥1xn1−xn=∑n≥1xn2(1+xn)1−xn.{displaystyle sum _{ngeq 1}{frac {x^{n}}{1-x^{n}}}=sum _{ngeq 1}{frac {x^{n^{2}}(1+x^{n})}{1-x^{n}}}.}{displaystyle sum _{ngeq 1}{frac {x^{n}}{1-x^{n}}}=sum _{ngeq 1}{frac {x^{n^{2}}(1+x^{n})}{1-x^{n}}}.}


Bell series


BGp⁡(n2;x)=∑n=0∞(pn)2xn=11−p2x{displaystyle operatorname {BG} _{p}(n^{2};x)=sum _{n=0}^{infty }(p^{n})^{2}x^{n}={frac {1}{1-p^{2}x}}}operatorname{BG}_p(n^2;x)=sum_{n=0}^infty (p^{n})^2x^n=frac{1}{1-p^2x}


Dirichlet series generating function


DG⁡(n2;s)=∑n=1∞n2ns=ζ(s−2),{displaystyle operatorname {DG} (n^{2};s)=sum _{n=1}^{infty }{frac {n^{2}}{n^{s}}}=zeta (s-2),}{displaystyle operatorname {DG} (n^{2};s)=sum _{n=1}^{infty }{frac {n^{2}}{n^{s}}}=zeta (s-2),}

using the Riemann zeta function.


The sequence ak generated by a Dirichlet series generating function (DGF) corresponding to:


DG⁡(ak;s)=ζ(s)m{displaystyle operatorname {DG} (a_{k};s)=zeta (s)^{m}}{displaystyle operatorname {DG} (a_{k};s)=zeta (s)^{m}}

where ζ(s){displaystyle zeta (s)}zeta (s) is the Riemann zeta function, has the ordinary generating function:


k=1k=nakxk=x+(m1)∑2≤a≤nxa+(m2)∑a≥2∑b≥2ab≤nxab+(m3)∑a≥2∑c≥2∑b≥2abc≤nxabc+(m4)∑a≥2∑b≥2∑c≥2∑d≥2abcd≤nxabcd+⋯{displaystyle sum _{k=1}^{k=n}a_{k}x^{k}=x+{m choose 1}sum _{2leq aleq n}x^{a}+{m choose 2}{underset {ableq n}{sum _{ageq 2}sum _{bgeq 2}}}x^{ab}+{m choose 3}{underset {abcleq n}{sum _{ageq 2}sum _{cgeq 2}sum _{bgeq 2}}}x^{abc}+{m choose 4}{underset {abcdleq n}{sum _{ageq 2}sum _{bgeq 2}sum _{cgeq 2}sum _{dgeq 2}}}x^{abcd}+cdots }{displaystyle sum _{k=1}^{k=n}a_{k}x^{k}=x+{m choose 1}sum _{2leq aleq n}x^{a}+{m choose 2}{underset {ableq n}{sum _{ageq 2}sum _{bgeq 2}}}x^{ab}+{m choose 3}{underset {abcleq n}{sum _{ageq 2}sum _{cgeq 2}sum _{bgeq 2}}}x^{abc}+{m choose 4}{underset {abcdleq n}{sum _{ageq 2}sum _{bgeq 2}sum _{cgeq 2}sum _{dgeq 2}}}x^{abcd}+cdots }


Multivariate generating functions


Multivariate generating functions arise in practice when calculating the number of contingency tables of non-negative integers with specified row and column totals. Suppose the table has r rows and c columns; the row sums are t1,…tr{displaystyle t_{1},ldots t_{r}}t_1,ldots t_r and the column sums are s1,…sc{displaystyle s_{1},ldots s_{c}}s_1,ldots s_c. Then, according to I. J. Good,[20] the number of such tables is the coefficient of


x1t1…xrtry1s1…ycsc{displaystyle x_{1}^{t_{1}}ldots x_{r}^{t_{r}}y_{1}^{s_{1}}ldots y_{c}^{s_{c}}}x_1^{t_1}ldots x_r^{t_r}y_1^{s_1}ldots y_c^{s_c}

in


i=1r∏j=1c11−xiyj.{displaystyle prod _{i=1}^{r}prod _{j=1}^{c}{frac {1}{1-x_{i}y_{j}}}.}prod_{i=1}^{r}prod_{j=1}^cfrac{1}{1-x_iy_j}.

In the bivariate case, non-polynomial double sum examples of so-termed "double" or "super" generating functions of the form G(w,z):=∑m,n≥0gm,nwmzn{displaystyle G(w,z):=sum _{m,ngeq 0}g_{m,n}w^{m}z^{n}}{displaystyle G(w,z):=sum _{m,ngeq 0}g_{m,n}w^{m}z^{n}} include the following two-variable generating functions for the binomial coefficients, the Stirling numbers, and the Eulerian numbers:[21]


ez+wz=∑m,n≥0(nm)wmznn!ew(ez−1)=∑m,n≥0{nm}wmznn!1(1−z)w=∑m,n≥0[nm]wmznn!1−we(w−1)z−w=∑m,n≥0⟨nm⟩wmznn!ew−ezwez−zew=∑m,n≥0⟨m+n+1m⟩wmzn(m+n+1)!.{displaystyle {begin{aligned}e^{z+wz}&=sum _{m,ngeq 0}{binom {n}{m}}w^{m}{frac {z^{n}}{n!}}\e^{w(e^{z}-1)}&=sum _{m,ngeq 0}left{{begin{matrix}n\mend{matrix}}right}w^{m}{frac {z^{n}}{n!}}\{frac {1}{(1-z)^{w}}}&=sum _{m,ngeq 0}left[{begin{matrix}n\mend{matrix}}right]w^{m}{frac {z^{n}}{n!}}\{frac {1-w}{e^{(w-1)z}-w}}&=sum _{m,ngeq 0}leftlangle {begin{matrix}n\mend{matrix}}rightrangle w^{m}{frac {z^{n}}{n!}}\{frac {e^{w}-e^{z}}{we^{z}-ze^{w}}}&=sum _{m,ngeq 0}leftlangle {begin{matrix}m+n+1\mend{matrix}}rightrangle {frac {w^{m}z^{n}}{(m+n+1)!}}.end{aligned}}}{displaystyle {begin{aligned}e^{z+wz}&=sum _{m,ngeq 0}{binom {n}{m}}w^{m}{frac {z^{n}}{n!}}\e^{w(e^{z}-1)}&=sum _{m,ngeq 0}left{{begin{matrix}n\mend{matrix}}right}w^{m}{frac {z^{n}}{n!}}\{frac {1}{(1-z)^{w}}}&=sum _{m,ngeq 0}left[{begin{matrix}n\mend{matrix}}right]w^{m}{frac {z^{n}}{n!}}\{frac {1-w}{e^{(w-1)z}-w}}&=sum _{m,ngeq 0}leftlangle {begin{matrix}n\mend{matrix}}rightrangle w^{m}{frac {z^{n}}{n!}}\{frac {e^{w}-e^{z}}{we^{z}-ze^{w}}}&=sum _{m,ngeq 0}leftlangle {begin{matrix}m+n+1\mend{matrix}}rightrangle {frac {w^{m}z^{n}}{(m+n+1)!}}.end{aligned}}}


Applications



Various techniques: Evaluating sums and tackling other problems with generating functions



Example 1: A formula for sums of harmonic numbers


Generating functions give us several methods to manipulate sums and to establish identities between sums.


The simplest case occurs when sn=∑k=0nak{displaystyle s_{n}=sum _{k=0}^{n}{a_{k}}}s_{n}=sum _{{k=0}}^{{n}}{a_{k}}. We then know that S(z)=A(z)1−z{displaystyle S(z)={frac {A(z)}{1-z}}}S(z)={frac  {A(z)}{1-z}} for the corresponding ordinary generating functions.


For example, we can manipulate sn=∑k=1nHk{displaystyle s_{n}=sum _{k=1}^{n}H_{k}}s_{n}=sum _{{k=1}}^{{n}}H_{{k}}, where Hk=1+12+⋯+1k{displaystyle H_{k}=1+{frac {1}{2}}+cdots +{frac {1}{k}}}H_{k}=1+{frac  {1}{2}}+cdots +{frac  {1}{k}} are the harmonic numbers. Let H(z)=∑n≥1Hnzn{displaystyle H(z)=sum _{ngeq 1}{H_{n}z^{n}}}{displaystyle H(z)=sum _{ngeq 1}{H_{n}z^{n}}} be the ordinary generating function of the harmonic numbers. Then


H(z)=∑n≥11nzn1−z,{displaystyle H(z)={dfrac {sum _{ngeq 1}{{frac {1}{n}}z^{n}}}{1-z}},,}H(z)={dfrac  {sum _{{ngeq 1}}{{frac  {1}{n}}z^{n}}}{1-z}},,

and thus


S(z)=∑n≥1snzn=∑n≥11nzn(1−z)2.{displaystyle S(z)=sum _{ngeq 1}{s_{n}z^{n}}={dfrac {sum _{ngeq 1}{{frac {1}{n}}z^{n}}}{(1-z)^{2}}},.}S(z)=sum _{{ngeq 1}}{s_{n}z^{n}}={dfrac  {sum _{{ngeq 1}}{{frac  {1}{n}}z^{n}}}{(1-z)^{2}}},.

Using 1(1−z)2=∑n≥0(n+1)zn{displaystyle {frac {1}{(1-z)^{2}}}=sum _{ngeq 0}{(n+1)z^{n}}}{frac  {1}{(1-z)^{2}}}=sum _{{ngeq 0}}{(n+1)z^{n}}, convolution with the numerator yields


sn=∑k=1n1k(n+1−k)=(n+1)Hn−n,{displaystyle s_{n}=sum _{k=1}^{n}{{frac {1}{k}}(n+1-k)}=(n+1)H_{n}-n,,}s_{n}=sum _{{k=1}}^{{n}}{{frac  {1}{k}}(n+1-k)}=(n+1)H_{n}-n,,

which can also be written as


k=1nHk=(n+1)(Hn+1−1).{displaystyle sum _{k=1}^{n}{H_{k}}=(n+1)(H_{n+1}-1),.}sum _{{k=1}}^{{n}}{H_{k}}=(n+1)(H_{{n+1}}-1),.


Example 2: Modified binomial coefficient sums and the binomial transform


As another example of using generating functions to relate sequences and manipulate sums, for an arbitrary sequence fn⟩{displaystyle langle f_{n}rangle }{displaystyle langle f_{n}rangle } we define the two sequences of sums



sn:=∑m=0n(nm)fm3n−m{displaystyle s_{n}:=sum _{m=0}^{n}{binom {n}{m}}f_{m}3^{n-m}}{displaystyle s_{n}:=sum _{m=0}^{n}{binom {n}{m}}f_{m}3^{n-m}}

s~n:=∑m=0n(nm)(m+1)(m+2)(m+3)fm3n−m,{displaystyle {widetilde {s}}_{n}:=sum _{m=0}^{n}{binom {n}{m}}(m+1)(m+2)(m+3)f_{m}3^{n-m},}{displaystyle {widetilde {s}}_{n}:=sum _{m=0}^{n}{binom {n}{m}}(m+1)(m+2)(m+3)f_{m}3^{n-m},}


for all n≥0{displaystyle ngeq 0}ngeq 0, and seek to express the second sums in terms of the first. We suggest an approach by generating functions.


First, we use the binomial transform to write the generating function for the first sum as


S(z)=1(1−3z)F(z1−3z).{displaystyle S(z)={frac {1}{(1-3z)}}Fleft({frac {z}{1-3z}}right).}{displaystyle S(z)={frac {1}{(1-3z)}}Fleft({frac {z}{1-3z}}right).}

Since the generating function for the sequence (n+1)(n+2)(n+3)fn⟩{displaystyle langle (n+1)(n+2)(n+3)f_{n}rangle }{displaystyle langle (n+1)(n+2)(n+3)f_{n}rangle } is given by 6F(z)+18zF′(z)+9z2F′(z)+z3F(3)(z){displaystyle 6F(z)+18zF^{prime }(z)+9z^{2}F^{prime prime }(z)+z^{3}F^{(3)}(z)}{displaystyle 6F(z)+18zF^{prime }(z)+9z^{2}F^{prime prime }(z)+z^{3}F^{(3)}(z)}, we may write the generating function for the second sum defined above in the form


S~(z)=6(1−3z)F(z1−3z)+18z(1−3z)2F′(z1−3z)+9z2(1−3z)3F′(z1−3z)+z3(1−3z)4F(3)(z1−3z).{displaystyle {widetilde {S}}(z)={frac {6}{(1-3z)}}Fleft({frac {z}{1-3z}}right)+{frac {18z}{(1-3z)^{2}}}F^{prime }left({frac {z}{1-3z}}right)+{frac {9z^{2}}{(1-3z)^{3}}}F^{prime prime }left({frac {z}{1-3z}}right)+{frac {z^{3}}{(1-3z)^{4}}}F^{(3)}left({frac {z}{1-3z}}right).}{displaystyle {widetilde {S}}(z)={frac {6}{(1-3z)}}Fleft({frac {z}{1-3z}}right)+{frac {18z}{(1-3z)^{2}}}F^{prime }left({frac {z}{1-3z}}right)+{frac {9z^{2}}{(1-3z)^{3}}}F^{prime prime }left({frac {z}{1-3z}}right)+{frac {z^{3}}{(1-3z)^{4}}}F^{(3)}left({frac {z}{1-3z}}right).}

In particular, we may write this modified sum generating function in the form of


a(z)⋅S(z)+b(z)⋅zS′(z)+c(z)⋅z2S′(z)+d(z)⋅z3S(3)(z),{displaystyle a(z)cdot S(z)+b(z)cdot zS^{prime }(z)+c(z)cdot z^{2}S^{prime prime }(z)+d(z)cdot z^{3}S^{(3)}(z),}{displaystyle a(z)cdot S(z)+b(z)cdot zS^{prime }(z)+c(z)cdot z^{2}S^{prime prime }(z)+d(z)cdot z^{3}S^{(3)}(z),}

for a(z)=6(1−3z)3{displaystyle a(z)=6(1-3z)^{3}}{displaystyle a(z)=6(1-3z)^{3}}, b(z)=18(1−3z)3{displaystyle b(z)=18(1-3z)^{3}}{displaystyle b(z)=18(1-3z)^{3}}, c(z)=9(1−3z)3{displaystyle c(z)=9(1-3z)^{3}}{displaystyle c(z)=9(1-3z)^{3}}, and d(z)=(1−3z)3{displaystyle d(z)=(1-3z)^{3}}{displaystyle d(z)=(1-3z)^{3}} where (1−3z)3=1−9z+27z2−27z3{displaystyle (1-3z)^{3}=1-9z+27z^{2}-27z^{3}}{displaystyle (1-3z)^{3}=1-9z+27z^{2}-27z^{3}}.


Finally, it follows that we may express the second sums through the first sums in the following form:


s~n=[zn](6(1−3z)3∑n≥0snzn+18(1−3z)3∑n≥0nsnzn+9(1−3z)3∑n≥0n(n−1)snzn+(1−3z)3∑n≥0n(n−1)(n−2)snzn)=(n+1)(n+2)(n+3)sn−9n(n+1)(n+2)sn−1+27(n−1)n(n+1)sn−2−(n−2)(n−1)nsn−3.{displaystyle {begin{aligned}{widetilde {s}}_{n}&=[z^{n}]left(6(1-3z)^{3}sum _{ngeq 0}s_{n}z^{n}+18(1-3z)^{3}sum _{ngeq 0}ns_{n}z^{n}+9(1-3z)^{3}sum _{ngeq 0}n(n-1)s_{n}z^{n}+(1-3z)^{3}sum _{ngeq 0}n(n-1)(n-2)s_{n}z^{n}right)\&=(n+1)(n+2)(n+3)s_{n}-9n(n+1)(n+2)s_{n-1}+27(n-1)n(n+1)s_{n-2}-(n-2)(n-1)ns_{n-3}.end{aligned}}}{displaystyle {begin{aligned}{widetilde {s}}_{n}&=[z^{n}]left(6(1-3z)^{3}sum _{ngeq 0}s_{n}z^{n}+18(1-3z)^{3}sum _{ngeq 0}ns_{n}z^{n}+9(1-3z)^{3}sum _{ngeq 0}n(n-1)s_{n}z^{n}+(1-3z)^{3}sum _{ngeq 0}n(n-1)(n-2)s_{n}z^{n}right)\&=(n+1)(n+2)(n+3)s_{n}-9n(n+1)(n+2)s_{n-1}+27(n-1)n(n+1)s_{n-2}-(n-2)(n-1)ns_{n-3}.end{aligned}}}


Example 3: Generating functions for mutually recursive sequences


In this example, we re-formulate a generating function example given in Section 7.3 of Concrete Mathematics (see also Section 7.1 of the same reference for pretty pictures of generating function series). In particular, suppose that we seek the total number of ways (denoted Un{displaystyle U_{n}}U_{n}) to tile a n{displaystyle 3times n}{displaystyle 3times n} rectangle with unmarked 1{displaystyle 2times 1}2times 1 domino pieces. Let the auxiliary sequence, Vn{displaystyle V_{n}}V_{n}, be defined as the number of ways to cover a n{displaystyle 3times n}{displaystyle 3times n} rectangle-minus-corner section of the full rectangle. We seek to use these definitions to give a closed form formula for Un{displaystyle U_{n}}U_{n} without breaking down this definition further to handle the cases of vertical versus horizontal dominoes. Notice that the ordinary generating functions for our two sequences correspond to the series



U(z)=1+3z2+11z4+41z6+⋯{displaystyle U(z)=1+3z^{2}+11z^{4}+41z^{6}+cdots }{displaystyle U(z)=1+3z^{2}+11z^{4}+41z^{6}+cdots }

V(z)=z+4z3+15z5+56z7+⋯.{displaystyle V(z)=z+4z^{3}+15z^{5}+56z^{7}+cdots .}{displaystyle V(z)=z+4z^{3}+15z^{5}+56z^{7}+cdots .}


If we consider the possible configurations that can be given starting from the left edge of the n{displaystyle 3times n}{displaystyle 3times n} rectangle, we are able to express the following mutually dependent, or mutually recursive, recurrence relations for our two sequences when n≥2{displaystyle ngeq 2}ngeq 2 defined as above where U0=1{displaystyle U_{0}=1}{displaystyle U_{0}=1}, U1=0{displaystyle U_{1}=0}{displaystyle U_{1}=0}, V0=0{displaystyle V_{0}=0}V_{0}=0, and V1=1{displaystyle V_{1}=1}{displaystyle V_{1}=1}:


Un=2Vn−1+Un−2Vn=Un−1+Vn−2.{displaystyle {begin{aligned}U_{n}&=2V_{n-1}+U_{n-2}\V_{n}&=U_{n-1}+V_{n-2}.end{aligned}}}{displaystyle {begin{aligned}U_{n}&=2V_{n-1}+U_{n-2}\V_{n}&=U_{n-1}+V_{n-2}.end{aligned}}}

Since we have that for all integers m≥0{displaystyle mgeq 0}mgeq 0, the index-shifted generating functions satisfy zmG(z)=∑n≥mgn−mzn{displaystyle z^{m}G(z)=sum _{ngeq m}g_{n-m}z^{n}}{displaystyle z^{m}G(z)=sum _{ngeq m}g_{n-m}z^{n}} (incidentally, we also have a corresponding formula when m<0{displaystyle m<0}m<0 given by n≥0gn+mzn=G(z)−g0−g1z−gm−1zm−1zm{displaystyle sum _{ngeq 0}g_{n+m}z^{n}={frac {G(z)-g_{0}-g_{1}z-cdots -g_{m-1}z^{m-1}}{z^{m}}}}{displaystyle sum _{ngeq 0}g_{n+m}z^{n}={frac {G(z)-g_{0}-g_{1}z-cdots -g_{m-1}z^{m-1}}{z^{m}}}}), we can use the initial conditions specified above and the previous two recurrence relations to see that we have the next two equations relating the generating functions for these sequences given by


U(z)=2zV(z)+z2U(z)+1V(z)=zU(z)+z2V(z)=z1−z2U(z),{displaystyle {begin{aligned}U(z)&=2zV(z)+z^{2}U(z)+1\V(z)&=zU(z)+z^{2}V(z)\&={frac {z}{1-z^{2}}}U(z),end{aligned}}}{displaystyle {begin{aligned}U(z)&=2zV(z)+z^{2}U(z)+1\V(z)&=zU(z)+z^{2}V(z)\&={frac {z}{1-z^{2}}}U(z),end{aligned}}}

which then implies by solving the system of equations (and this is the particular trick to our method here) that


U(z)=1−z21−4z2+z4=13−3⋅11−(2+3)z2+13+3⋅11−(2−3)z2.{displaystyle U(z)={frac {1-z^{2}}{1-4z^{2}+z^{4}}}={frac {1}{3-{sqrt {3}}}}cdot {frac {1}{1-(2+{sqrt {3}})z^{2}}}+{frac {1}{3+{sqrt {3}}}}cdot {frac {1}{1-(2-{sqrt {3}})z^{2}}}.}{displaystyle U(z)={frac {1-z^{2}}{1-4z^{2}+z^{4}}}={frac {1}{3-{sqrt {3}}}}cdot {frac {1}{1-(2+{sqrt {3}})z^{2}}}+{frac {1}{3+{sqrt {3}}}}cdot {frac {1}{1-(2-{sqrt {3}})z^{2}}}.}

Thus by performing algebraic simplifications to the sequence resulting from the second partial fractions expansions of the generating function in the previous equation, we find that U2n+1≡0{displaystyle U_{2n+1}equiv 0}{displaystyle U_{2n+1}equiv 0} and that


U2n=⌈(2+3)n3−3⌉,{displaystyle U_{2n}=leftlceil {frac {(2+{sqrt {3}})^{n}}{3-{sqrt {3}}}}rightrceil ,}{displaystyle U_{2n}=leftlceil {frac {(2+{sqrt {3}})^{n}}{3-{sqrt {3}}}}rightrceil ,}

for all integers n≥0{displaystyle ngeq 0}ngeq 0. We also note that the same shifted generating function technique applied to the second-order recurrence for the Fibonacci numbers is the prototypical example of using generating functions to solve recurrence relations in one variable already covered, or at least hinted at, in the subsection on rational functions given above.



Convolution (Cauchy products)


A discrete convolution of the terms in two formal power series turns a product of generating functions into a generating function enumerating a convolved sum of the original sequence terms (see Cauchy product).


1.Consider A(z) and B(z) are ordinary generating functions.
C(z)=A(z)B(z)⇔[zn]C(z)=∑k=0nakbn−k{displaystyle C(z)=A(z)B(z)Leftrightarrow [z^{n}]C(z)=sum _{k=0}^{n}{a_{k}b_{n-k}}}{displaystyle C(z)=A(z)B(z)Leftrightarrow [z^{n}]C(z)=sum _{k=0}^{n}{a_{k}b_{n-k}}}


2.Consider A(z) and B(z) are exponential generating functions.
C(z)=A(z)B(z)⇔[zn/n!]C(z)=∑k=0n(nk)akbn−k{displaystyle C(z)=A(z)B(z)Leftrightarrow [z^{n}/n!]C(z)=sum _{k=0}^{n}{binom {n}{k}}a_{k}b_{n-k}}{displaystyle C(z)=A(z)B(z)Leftrightarrow [z^{n}/n!]C(z)=sum _{k=0}^{n}{binom {n}{k}}a_{k}b_{n-k}}


3.Consider the triply convolved sequence resulting from the product of three ordinary generating functions
C(z)=F(z)G(z)H(z)⇔[zn]C(z)=∑j+k+ℓ=nfjgkhℓ{displaystyle C(z)=F(z)G(z)H(z)Leftrightarrow [z^{n}]C(z)=sum _{j+k+ell =n}f_{j}g_{k}h_{ell }}{displaystyle C(z)=F(z)G(z)H(z)Leftrightarrow [z^{n}]C(z)=sum _{j+k+ell =n}f_{j}g_{k}h_{ell }}


4.Consider the m{displaystyle m}m-fold convolution of a sequence with itself for some positive integer m≥1{displaystyle mgeq 1}{displaystyle mgeq 1} (see the example below for an application)
C(z)=G(z)m⇔[zn]C(z)=∑k1+k2+⋯+km=ngk1gk2⋯gkm{displaystyle C(z)=G(z)^{m}Leftrightarrow [z^{n}]C(z)=sum _{k_{1}+k_{2}+cdots +k_{m}=n}g_{k_{1}}g_{k_{2}}cdots g_{k_{m}}}{displaystyle C(z)=G(z)^{m}Leftrightarrow [z^{n}]C(z)=sum _{k_{1}+k_{2}+cdots +k_{m}=n}g_{k_{1}}g_{k_{2}}cdots g_{k_{m}}}


Multiplication of generating functions, or convolution of their underlying sequences, can correspond to a notion of independent events in certain counting and probability scenarios. For example, if we adopt the notational convention that the probability generating function, or pgf, of a random variable Z{displaystyle Z}Z is denoted by GZ(z){displaystyle G_{Z}(z)}{displaystyle G_{Z}(z)}, then we can show that for any two random variables [22]


GX+Y(z)=GX(z)GY(z),{displaystyle G_{X+Y}(z)=G_{X}(z)G_{Y}(z),}{displaystyle G_{X+Y}(z)=G_{X}(z)G_{Y}(z),}

if X{displaystyle X}X and Y{displaystyle Y}Y are independent. Similarly, the number of ways to pay n≥0{displaystyle ngeq 0}ngeq 0 cents in coin denominations of values in the set {1,5,10,25,50}{displaystyle {1,5,10,25,50}}{displaystyle {1,5,10,25,50}} (i.e., in pennies, nickels, dimes, quarters, and half dollars, respectively) is generated by the product


C(z)=11−z11−z511−z1011−z2511−z50,{displaystyle C(z)={frac {1}{1-z}}{frac {1}{1-z^{5}}}{frac {1}{1-z^{10}}}{frac {1}{1-z^{25}}}{frac {1}{1-z^{50}}},}{displaystyle C(z)={frac {1}{1-z}}{frac {1}{1-z^{5}}}{frac {1}{1-z^{10}}}{frac {1}{1-z^{25}}}{frac {1}{1-z^{50}}},}

and moreover, if we allow the n{displaystyle n}n cents to be paid in coins of any positive integer denomination, we arrive at the generating for the number of such combinations of change being generated by the partition function generating function expanded by the infinite q-Pochhammer symbol product of n≥1(1−zn)−1{displaystyle prod _{ngeq 1}(1-z^{n})^{-1}}{displaystyle prod _{ngeq 1}(1-z^{n})^{-1}}.



Example: The generating function for the Catalan numbers


An example where convolutions of generating functions are useful allows us to solve for a specific closed-form function representing the ordinary generating function for the Catalan numbers, Cn{displaystyle C_{n}}C_{n}. In particular, this sequence has the combinatorial interpretation as being the number of ways to insert parentheses into the product x0⋅x1⋯xn{displaystyle x_{0}cdot x_{1}cdots x_{n}}{displaystyle x_{0}cdot x_{1}cdots x_{n}} so that the order of multiplication is completely specified. For example, C2=2{displaystyle C_{2}=2}{displaystyle C_{2}=2} which corresponds to the two expressions x0⋅(x1⋅x2){displaystyle x_{0}cdot (x_{1}cdot x_{2})}{displaystyle x_{0}cdot (x_{1}cdot x_{2})} and (x0⋅x1)⋅x2{displaystyle (x_{0}cdot x_{1})cdot x_{2}}{displaystyle (x_{0}cdot x_{1})cdot x_{2}}. It follows that the sequence satisfies a recurrence relation given by


Cn=∑k=0n−1CkCn−1−k+δn,0=C0Cn−1+C1Cn−2+⋯+Cn−1C0+δn,0, n≥0,{displaystyle C_{n}=sum _{k=0}^{n-1}C_{k}C_{n-1-k}+delta _{n,0}=C_{0}C_{n-1}+C_{1}C_{n-2}+cdots +C_{n-1}C_{0}+delta _{n,0}, ngeq 0,}{displaystyle C_{n}=sum _{k=0}^{n-1}C_{k}C_{n-1-k}+delta _{n,0}=C_{0}C_{n-1}+C_{1}C_{n-2}+cdots +C_{n-1}C_{0}+delta _{n,0}, ngeq 0,}

and so has a corresponding convolved generating function, C(z){displaystyle C(z)}C(z), satisfying


C(z)=z⋅C(z)2+1.{displaystyle C(z)=zcdot C(z)^{2}+1.}{displaystyle C(z)=zcdot C(z)^{2}+1.}

Since C(0)=1≠{displaystyle C(0)=1neq infty }{displaystyle C(0)=1neq infty }, we then arrive at a formula for this generating function given by


C(z)=1−1−4z2z=∑n≥01n+1(2nn)zn.{displaystyle {begin{aligned}C(z)&={frac {1-{sqrt {1-4z}}}{2z}}\&=sum _{ngeq 0}{frac {1}{n+1}}{binom {2n}{n}}z^{n}.end{aligned}}}{displaystyle {begin{aligned}C(z)&={frac {1-{sqrt {1-4z}}}{2z}}\&=sum _{ngeq 0}{frac {1}{n+1}}{binom {2n}{n}}z^{n}.end{aligned}}}

Note that the first equation implicitly defining C(z){displaystyle C(z)}C(z) above implies that


C(z)=11−z⋅C(z),{displaystyle C(z)={frac {1}{1-zcdot C(z)}},}{displaystyle C(z)={frac {1}{1-zcdot C(z)}},}

which then leads to another "simple" (as in of form) continued fraction expansion of this generating function.



Example: Spanning trees of fans and convolutions of convolutions


A fan of order n{displaystyle n}n is defined to be a graph on the vertices {0,1,⋯,n}{displaystyle {0,1,cdots ,n}}{displaystyle {0,1,cdots ,n}} with 2n−1{displaystyle 2n-1}2n-1 edges connected according to the following rules: Vertex 0{displaystyle 0}{displaystyle 0} is connected by a single edge to each of the other n{displaystyle n}n vertices, and vertex k{displaystyle k}k is connected by a single edge to the next vertex k+1{displaystyle k+1}k+1 for all 1≤k<n{displaystyle 1leq k<n}1 leq k < n.[23] There is one fan of order one, three fans of order two, eight fans of order three, and so on. A spanning tree is a subgraph of a graph which contains all of the original vertices and which contains enough edges to make this subgraph connected, but not so many edges that there is a cycle in the subgraph. We ask how many spanning trees fn{displaystyle f_{n}}f_{n} of a fan of order n{displaystyle n}n are possible for each n≥1{displaystyle ngeq 1}ngeq 1.


As an observation, we may approach the question by counting the number of ways to join adjacent sets of vertices. For example, when n=4{displaystyle n=4}n=4, we have that f4=4+3⋅1+2⋅2+1⋅3+2⋅1⋅1+1⋅2⋅1+1⋅1⋅2+1⋅1⋅1⋅1⋅1=21{displaystyle f_{4}=4+3cdot 1+2cdot 2+1cdot 3+2cdot 1cdot 1+1cdot 2cdot 1+1cdot 1cdot 2+1cdot 1cdot 1cdot 1cdot 1=21}{displaystyle f_{4}=4+3cdot 1+2cdot 2+1cdot 3+2cdot 1cdot 1+1cdot 2cdot 1+1cdot 1cdot 2+1cdot 1cdot 1cdot 1cdot 1=21}, which is a sum over the m{displaystyle m}m-fold convolutions of the sequence gn=n=[zn]z/(1−z)2{displaystyle g_{n}=n=[z^{n}]z/(1-z)^{2}}{displaystyle g_{n}=n=[z^{n}]z/(1-z)^{2}} for m:=1,2,3,4{displaystyle m:=1,2,3,4}{displaystyle m:=1,2,3,4}. More generally, we may write a formula for this sequence as


fn=∑m>0∑k1+k2+⋯+km=nk1,k2,…,km>0gk1gk2⋯gkm,{displaystyle f_{n}=sum _{m>0}sum _{scriptstyle k_{1}+k_{2}+cdots +k_{m}=n atop scriptstyle k_{1},k_{2},ldots ,k_{m}>0}g_{k_{1}}g_{k_{2}}cdots g_{k_{m}},}{displaystyle f_{n}=sum _{m>0}sum _{scriptstyle k_{1}+k_{2}+cdots +k_{m}=n atop scriptstyle k_{1},k_{2},ldots ,k_{m}>0}g_{k_{1}}g_{k_{2}}cdots g_{k_{m}},}

from which we see that the ordinary generating function for this sequence is given by the next sum of convolutions as


F(z)=G(z)+G(z)2+G(z)3+⋯=G(z)1−G(z)=z(1−z)2−z=z1−3z+z2,{displaystyle {begin{aligned}F(z)&=G(z)+G(z)^{2}+G(z)^{3}+cdots \&={frac {G(z)}{1-G(z)}}\&={frac {z}{(1-z)^{2}-z}}={frac {z}{1-3z+z^{2}}},end{aligned}}}{displaystyle {begin{aligned}F(z)&=G(z)+G(z)^{2}+G(z)^{3}+cdots \&={frac {G(z)}{1-G(z)}}\&={frac {z}{(1-z)^{2}-z}}={frac {z}{1-3z+z^{2}}},end{aligned}}}

from which we are able to extract an exact formula for the sequence by taking the partial fraction expansion of the last generating function.



Implicit generating functions and the Lagrange inversion formula



Introducing a free parameter (snake oil method)


Sometimes the sum sn{displaystyle s_{n}}s_{n} is complicated, and it is not always easy to evaluate. The "Free Parameter" method is another method (called "snake oil" by H. Wilf) to evaluate these sums.


Both methods discussed so far have n{displaystyle n}n as limit in the summation. When n does not appear explicitly in the summation, we may consider n{displaystyle n}n as a “free” parameter and treat sn{displaystyle s_{n}}s_{n} as a coefficient of F(z)=∑snzn{displaystyle F(z)=sum {s_{n}z^{n}}}F(z)=sum {s_{n}z^{n}}, change the order of the summations on n{displaystyle n}n and k{displaystyle k}k, and try to compute the inner sum.


For example, if we want to compute


sn=∑k≥0(n+km+2k)(2kk)(−1)kk+1(m,n∈N0){displaystyle s_{n}=sum _{kgeq 0}{{binom {n+k}{m+2k}}{binom {2k}{k}}{frac {(-1)^{k}}{k+1}}}quad (m,nin mathbb {N} _{0})}s_{n}=sum _{{kgeq 0}}{{binom  {n+k}{m+2k}}{binom  {2k}{k}}{frac  {(-1)^{k}}{k+1}}}quad (m,nin {mathbb  {N}}_{0})

we can treat n{displaystyle n}n as a "free" parameter, and set


F(z)=∑n≥0[∑k≥0(n+km+2k)(2kk)(−1)kk+1]zn{displaystyle F(z)=sum _{ngeq 0}{left[sum _{kgeq 0}{{binom {n+k}{m+2k}}{binom {2k}{k}}{frac {(-1)^{k}}{k+1}}}right]}z^{n}}F(z)=sum _{{ngeq 0}}{left[sum _{{kgeq 0}}{{binom  {n+k}{m+2k}}{binom  {2k}{k}}{frac  {(-1)^{k}}{k+1}}}right]}z^{n}

Interchanging summation (“snake oil”) gives


F(z)=∑k≥0(2kk)(−1)kk+1z−k∑n≥0(n+km+2k)zn+k{displaystyle F(z)=sum _{kgeq 0}{{binom {2k}{k}}{frac {(-1)^{k}}{k+1}}z^{-k}}sum _{ngeq 0}{{binom {n+k}{m+2k}}z^{n+k}}}F(z)=sum _{{kgeq 0}}{{binom  {2k}{k}}{frac  {(-1)^{k}}{k+1}}z^{{-k}}}sum _{{ngeq 0}}{{binom  {n+k}{m+2k}}z^{{n+k}}}

Now the inner sum is zm+2k(1−z)m+2k+1{displaystyle {frac {z^{m+2k}}{(1-z)^{m+2k+1}}}}{frac  {z^{{m+2k}}}{(1-z)^{{m+2k+1}}}}. Thus


F(z)=zm(1−z)m+1∑k≥01k+1(2kk)(−z(1−z)2)k=zm(1−z)m+1∑k≥0Ck(−z(1−z)2)k(where Ck=kth Catalan number)=zm(1−z)m+11−1+4z(1−z)2−2z(1−z)2=−zm−12(1−z)m−1(1−1+z1−z)=zm(1−z)m=zzm−1(1−z)m.{displaystyle {begin{aligned}F(z)&={frac {z^{m}}{(1-z)^{m+1}}}sum _{kgeq 0}{{frac {1}{k+1}}{binom {2k}{k}}({frac {-z}{(1-z)^{2}}})^{k}}\&={frac {z^{m}}{(1-z)^{m+1}}}sum _{kgeq 0}{C_{k}({frac {-z}{(1-z)^{2}}})^{k}}quad {text{(where }}C_{k}=k^{text{th}}{text{ Catalan number)}}\&={frac {z^{m}}{(1-z)^{m+1}}}{frac {1-{sqrt {1+{frac {4z}{(1-z)^{2}}}}}}{frac {-2z}{(1-z)^{2}}}}\&={frac {-z^{m-1}}{2(1-z)^{m-1}}}(1-{frac {1+z}{1-z}})\&={frac {z^{m}}{(1-z)^{m}}}=z{frac {z^{m-1}}{(1-z)^{m}}}.end{aligned}}}{displaystyle {begin{aligned}F(z)&={frac {z^{m}}{(1-z)^{m+1}}}sum _{kgeq 0}{{frac {1}{k+1}}{binom {2k}{k}}({frac {-z}{(1-z)^{2}}})^{k}}\&={frac {z^{m}}{(1-z)^{m+1}}}sum _{kgeq 0}{C_{k}({frac {-z}{(1-z)^{2}}})^{k}}quad {text{(where }}C_{k}=k^{text{th}}{text{ Catalan number)}}\&={frac {z^{m}}{(1-z)^{m+1}}}{frac {1-{sqrt {1+{frac {4z}{(1-z)^{2}}}}}}{frac {-2z}{(1-z)^{2}}}}\&={frac {-z^{m-1}}{2(1-z)^{m-1}}}(1-{frac {1+z}{1-z}})\&={frac {z^{m}}{(1-z)^{m}}}=z{frac {z^{m-1}}{(1-z)^{m}}}.end{aligned}}}

Then we obtain


sn=(n−1m−1) for m≥1,sn=[n=0] for m=0.{displaystyle s_{n}={binom {n-1}{m-1}}quad {text{ for }}quad mgeq 1quad ,quad s_{n}=[n=0]quad {text{ for }}quad m=0.}{displaystyle s_{n}={binom {n-1}{m-1}}quad {text{ for }}quad mgeq 1quad ,quad s_{n}=[n=0]quad {text{ for }}quad m=0.}


Generating functions prove congruences


We say that two generating functions (power series) are congruent modulo m{displaystyle m}m, written A(z)≡B(z)(modm){displaystyle A(z)equiv B(z){pmod {m}}}{displaystyle A(z)equiv B(z){pmod {m}}} if their coefficients are congruent modulo m{displaystyle m}m for all n≥0{displaystyle ngeq 0}ngeq 0, i.e., an≡bn(modm){displaystyle a_{n}equiv b_{n}{pmod {m}}}{displaystyle a_{n}equiv b_{n}{pmod {m}}} for all relevant cases of the integers n{displaystyle n}n (note that we need not assume that m{displaystyle m}m is an integer here—it may very well be polynomial-valued in some indeterminate x{displaystyle x}x, for example). If the "simpler" right-hand-side generating function, B(z){displaystyle B(z)}B(z), is a rational function of z{displaystyle z}z, then the form of this sequences suggests that the sequence is eventually periodic modulo fixed particular cases of integer-valued m≥2{displaystyle mgeq 2}m geq 2. For example, we can prove that the Euler numbers, En⟩=⟨1,1,5,61,1385,…1,1,2,1,2,1,2,…(mod3){displaystyle langle E_{n}rangle =langle 1,1,5,61,1385,ldots rangle longmapsto langle 1,1,2,1,2,1,2,ldots rangle {pmod {3}}}{displaystyle langle E_{n}rangle =langle 1,1,5,61,1385,ldots rangle longmapsto langle 1,1,2,1,2,1,2,ldots rangle {pmod {3}}}, satisfy the following congruence modulo 3{displaystyle 3}3:[24]


n≥0Enzn=1−z21+z2(mod3).{displaystyle sum _{ngeq 0}E_{n}z^{n}={frac {1-z^{2}}{1+z^{2}}}{pmod {3}}.}{displaystyle sum _{ngeq 0}E_{n}z^{n}={frac {1-z^{2}}{1+z^{2}}}{pmod {3}}.}

One of the most useful, if not downright powerful, methods of obtaining congruences for sequences enumerated by special generating functions modulo any integers (i.e., not only prime powers pk{displaystyle p^{k}}p^{k}) is given in the section on continued fraction representations of (even non-convergent) ordinary generating functions by J-fractions above. We cite one particular result related to generating series expanded through a representation by continued fraction from Lando's Lectures on Generating Functions as follows:



Theorem: (Congruences for Series Generated by Expansions of Continued Fractions) Suppose that the generating function A(z){displaystyle A(z)}A(z) is represented by an infinite continued fraction of the form

A(z)=11−c1zp1z21−c2zp2z21−c3z⋯,{displaystyle A(z)={frac {1}{1-c_{1}z}}{frac {p_{1}z^{2}}{1-c_{2}z}}{frac {p_{2}z^{2}}{1-c_{3}z}}cdots ,}{displaystyle A(z)={frac {1}{1-c_{1}z}}{frac {p_{1}z^{2}}{1-c_{2}z}}{frac {p_{2}z^{2}}{1-c_{3}z}}cdots ,}

and that Ap(z){displaystyle A_{p}(z)}{displaystyle A_{p}(z)} denotes the pth{displaystyle p^{th}}p^{{th}} convergent to this continued fraction expansion defined such that an=[zn]Ap(z){displaystyle a_{n}=[z^{n}]A_{p}(z)}{displaystyle a_{n}=[z^{n}]A_{p}(z)} for all 0≤n<2p{displaystyle 0leq n<2p}{displaystyle 0leq n<2p}. Then 1) the function Ap(z){displaystyle A_{p}(z)}{displaystyle A_{p}(z)} is rational for all p≥2{displaystyle pgeq 2}{displaystyle pgeq 2} where we assume that one of divisibility criteria of p|p1,p1p2,p1p2p3⋯{displaystyle p|p_{1},p_{1}p_{2},p_{1}p_{2}p_{3}cdots }{displaystyle p|p_{1},p_{1}p_{2},p_{1}p_{2}p_{3}cdots } is met, i.e., p|p1p2⋯pk{displaystyle p|p_{1}p_{2}cdots p_{k}}{displaystyle p|p_{1}p_{2}cdots p_{k}} for some k≥1{displaystyle kgeq 1}kgeq 1; and 2) If the integer p{displaystyle p}p divides the product p1p2⋯pk{displaystyle p_{1}p_{2}cdots p_{k}}{displaystyle p_{1}p_{2}cdots p_{k}}, then we have that A(z)≡Ak(z)(modp){displaystyle A(z)equiv A_{k}(z){pmod {p}}}{displaystyle A(z)equiv A_{k}(z){pmod {p}}}.

Generating functions also have other uses in proving congruences for their coefficients. We cite the next two specific examples deriving special case congruences for the Stirling numbers of the first kind and for the partition function (mathematics) p(n){displaystyle p(n)}p(n) which show the versatility of generating functions in tackling problems involving integer sequences.



The Stirling numbers modulo small integers


The main article on the Stirling numbers generated by the finite products


Sn(x):=∑k=0n[nk]xk=x(x+1)(x+2)⋯(x+n−1), n≥1,{displaystyle S_{n}(x):=sum _{k=0}^{n}left[{begin{matrix}n\kend{matrix}}right]x^{k}=x(x+1)(x+2)cdots (x+n-1), ngeq 1,}{displaystyle S_{n}(x):=sum _{k=0}^{n}left[{begin{matrix}n\kend{matrix}}right]x^{k}=x(x+1)(x+2)cdots (x+n-1), ngeq 1,}

provides an overview of the congruences for these numbers derived strictly from properties of their generating function as in Section 4.6 of Wilf's stock reference Generatingfunctionology.
We repeat the basic argument and notice that when reduces modulo 2{displaystyle 2}2, these finite product generating functions each satisfy


Sn(x)=[x(x+1)]⋅[x(x+1)]⋯=x⌈n/2⌉(x+1)⌊n/2⌋,{displaystyle S_{n}(x)=[x(x+1)]cdot [x(x+1)]cdots =x^{lceil n/2rceil }(x+1)^{lfloor n/2rfloor },}{displaystyle S_{n}(x)=[x(x+1)]cdot [x(x+1)]cdots =x^{lceil n/2rceil }(x+1)^{lfloor n/2rfloor },}

which implies that the parity of these Stirling numbers matches that of the binomial coefficient


[nk]≡(⌊n/2⌋k−n/2⌉)(mod2),{displaystyle left[{begin{matrix}n\kend{matrix}}right]equiv {binom {lfloor n/2rfloor }{k-lceil n/2rceil }}{pmod {2}},}{displaystyle left[{begin{matrix}n\kend{matrix}}right]equiv {binom {lfloor n/2rfloor }{k-lceil n/2rceil }}{pmod {2}},}

and consequently shows that [nk]{displaystyle left[{begin{matrix}n\kend{matrix}}right]}{displaystyle left[{begin{matrix}n\kend{matrix}}right]} is even whenever k<⌈n2⌉{displaystyle k<leftlceil {frac {n}{2}}rightrceil }{displaystyle k<leftlceil {frac {n}{2}}rightrceil }.


Similarly, we can reduce the right-hand-side products defining the Stirling number generating functions modulo 3{displaystyle 3}3 to obtain slightly more complicated expressions providing that


[nm]≡[xm](x⌈n/3⌉(x+1)⌈(n−1)/3⌉(x+2)⌊n/3⌋)(mod3)≡k=0m(⌈(n−1)/3⌉k)(⌊n/3⌋m−k−n/3⌉2⌈n/3⌉+⌊n/3⌋(m−k)(mod3).{displaystyle {begin{aligned}left[{begin{matrix}n\mend{matrix}}right]&equiv [x^{m}]left(x^{lceil n/3rceil }(x+1)^{lceil (n-1)/3rceil }(x+2)^{lfloor n/3rfloor }right)&&{pmod {3}}\&equiv sum _{k=0}^{m}{binom {lceil (n-1)/3rceil }{k}}{binom {lfloor n/3rfloor }{m-k-lceil n/3rceil }}times 2^{lceil n/3rceil +lfloor n/3rfloor -(m-k)}&&{pmod {3}}.end{aligned}}}{displaystyle {begin{aligned}left[{begin{matrix}n\mend{matrix}}right]&equiv [x^{m}]left(x^{lceil n/3rceil }(x+1)^{lceil (n-1)/3rceil }(x+2)^{lfloor n/3rfloor }right)&&{pmod {3}}\&equiv sum _{k=0}^{m}{binom {lceil (n-1)/3rceil }{k}}{binom {lfloor n/3rfloor }{m-k-lceil n/3rceil }}times 2^{lceil n/3rceil +lfloor n/3rfloor -(m-k)}&&{pmod {3}}.end{aligned}}}


Congruences for the partition function


In this example, we pull in some of the machinery of infinite products whose power series expansions generate the expansions of many special functions and enumerate partition functions. In particular, we recall that the partition function p(n){displaystyle p(n)}p(n) is generated by the reciprocal infinite q-Pochhammer symbol product (or z-Pochhammer product as the case may be) given by


n≥1p(n)zn=1(1−z)(1−z2)(1−z3)⋯=1+z+2z2+3z3+5z4+7z5+11z6+⋯.{displaystyle {begin{aligned}sum _{ngeq 1}p(n)z^{n}&={frac {1}{(1-z)(1-z^{2})(1-z^{3})cdots }}\[4pt]&=1+z+2z^{2}+3z^{3}+5z^{4}+7z^{5}+11z^{6}+cdots .end{aligned}}}{displaystyle {begin{aligned}sum _{ngeq 1}p(n)z^{n}&={frac {1}{(1-z)(1-z^{2})(1-z^{3})cdots }}\[4pt]&=1+z+2z^{2}+3z^{3}+5z^{4}+7z^{5}+11z^{6}+cdots .end{aligned}}}

This partition function satisfies many known congruence properties, which notably include the following results though there are still many open questions about the forms of related integer congruences for the function:[25]


p(5m+4)≡0(mod5)p(7m+5)≡0(mod7)p(11m+4)≡0(mod11)p(25m+24)≡0(mod52).{displaystyle {begin{aligned}p(5m+4)&equiv 0{pmod {5}}\p(7m+5)&equiv 0{pmod {7}}\p(11m+4)&equiv 0{pmod {11}}\p(25m+24)&equiv 0{pmod {5^{2}}}.end{aligned}}}{displaystyle {begin{aligned}p(5m+4)&equiv 0{pmod {5}}\p(7m+5)&equiv 0{pmod {7}}\p(11m+4)&equiv 0{pmod {11}}\p(25m+24)&equiv 0{pmod {5^{2}}}.end{aligned}}}

We show how to use generating functions and manipulations of congruences for formal power series to give a highly elementary proof of the first of these congruences listed above.


First, we observe that the binomial coefficient generating function, 1/(1−z)5{displaystyle 1/(1-z)^{5}}{displaystyle 1/(1-z)^{5}}, satisfies that each of its coefficients are divisible by 5{displaystyle 5}5 with the exception of those which correspond to the powers of 1,z5,z10,…{displaystyle 1,z^{5},z^{10},ldots }{displaystyle 1,z^{5},z^{10},ldots }, all of which otherwise have a remainder of 1{displaystyle 1}1 modulo 5{displaystyle 5}5. Thus we may write


1(1−z)5≡11−z5(mod5)⟺1−z5(1−z)5≡1(mod5),{displaystyle {frac {1}{(1-z)^{5}}}equiv {frac {1}{1-z^{5}}}{pmod {5}}qquad iff qquad {frac {1-z^{5}}{(1-z)^{5}}}equiv 1{pmod {5}},}{displaystyle {frac {1}{(1-z)^{5}}}equiv {frac {1}{1-z^{5}}}{pmod {5}}qquad iff qquad {frac {1-z^{5}}{(1-z)^{5}}}equiv 1{pmod {5}},}

which in particular shows us that


(1−z5)(1−z10)(1−z15)⋯{(1−z)(1−z2)(1−z3)⋯}5≡1(mod5).{displaystyle {frac {(1-z^{5})(1-z^{10})(1-z^{15})cdots }{left{(1-z)(1-z^{2})(1-z^{3})cdots right}^{5}}}equiv 1{pmod {5}}.}{displaystyle {frac {(1-z^{5})(1-z^{10})(1-z^{15})cdots }{left{(1-z)(1-z^{2})(1-z^{3})cdots right}^{5}}}equiv 1{pmod {5}}.}

Hence, we easily see that 5{displaystyle 5}5 divides each coefficient of z5m+1{displaystyle z^{5m+1}}{displaystyle z^{5m+1}} in the infinite product expansions of


z⋅(1−z5)(1−z10)⋯(1−z)(1−z2)⋯=z⋅{(1−z)(1−z2)⋯}4×(1−z5)(1−z10)⋯{(1−z)(1−z2)⋯}5.{displaystyle zcdot {frac {(1-z^{5})(1-z^{10})cdots }{(1-z)(1-z^{2})cdots }}=zcdot left{(1-z)(1-z^{2})cdots right}^{4}times {frac {(1-z^{5})(1-z^{10})cdots }{left{(1-z)(1-z^{2})cdots right}^{5}}}.}{displaystyle zcdot {frac {(1-z^{5})(1-z^{10})cdots }{(1-z)(1-z^{2})cdots }}=zcdot left{(1-z)(1-z^{2})cdots right}^{4}times {frac {(1-z^{5})(1-z^{10})cdots }{left{(1-z)(1-z^{2})cdots right}^{5}}}.}

Finally, since we may write the generating function for the partition function as


z(1−z)(1−z2)⋯=z⋅(1−z5)(1−z10)⋯(1−z)(1−z2)⋯×(1+z5+z10+⋯)(1+z10+z20+⋯)⋯=z+∑n≥2p(n−1)zn,{displaystyle {begin{aligned}&{frac {z}{(1-z)(1-z^{2})cdots }}\[5pt]={}&zcdot {frac {(1-z^{5})(1-z^{10})cdots }{(1-z)(1-z^{2})cdots }}times (1+z^{5}+z^{10}+cdots )(1+z^{10}+z^{20}+cdots )cdots \[5pt]={}&z+sum _{ngeq 2}p(n-1)z^{n},end{aligned}}}{displaystyle {begin{aligned}&{frac {z}{(1-z)(1-z^{2})cdots }}\[5pt]={}&zcdot {frac {(1-z^{5})(1-z^{10})cdots }{(1-z)(1-z^{2})cdots }}times (1+z^{5}+z^{10}+cdots )(1+z^{10}+z^{20}+cdots )cdots \[5pt]={}&z+sum _{ngeq 2}p(n-1)z^{n},end{aligned}}}

we may equate the coefficients of z5m+5{displaystyle z^{5m+5}}{displaystyle z^{5m+5}} in the previous equations to prove our desired congruence result, namely that, p(5m+4)≡0(mod5){displaystyle p(5m+4)equiv 0{pmod {5}}}{displaystyle p(5m+4)equiv 0{pmod {5}}} for all m≥0{displaystyle mgeq 0}mgeq 0.



Transformations of generating functions


There are a number of transformations of generating functions that provide other applications (see the main article). A transformation of a sequence's ordinary generating function (OGF) provides a method of converting the generating function for one sequence into a generating function enumerating another. These transformations typically involve integral formulas involving a sequence OGF (see integral transformations) or weighted sums over the higher-order derivatives of these functions (see derivative transformations).


Generating function transformations can come into play when we seek to express a generating function for the sums


sn:=∑m=0n(nm)Cn,mam,{displaystyle s_{n}:=sum _{m=0}^{n}{binom {n}{m}}C_{n,m}a_{m},}{displaystyle s_{n}:=sum _{m=0}^{n}{binom {n}{m}}C_{n,m}a_{m},}

in the form of S(z)=g(z)A(f(z)){displaystyle S(z)=g(z)A(f(z))}{displaystyle S(z)=g(z)A(f(z))} involving the original sequence generating function. For example, if the sums sn:=∑k≥0(n+km+2k)ak{displaystyle s_{n}:=sum _{kgeq 0}{binom {n+k}{m+2k}}a_{k}}{displaystyle s_{n}:=sum _{kgeq 0}{binom {n+k}{m+2k}}a_{k}}, then the generating function for the modified sum expressions is given by S(z)=zm(1−z)m+1A(z(1−z)2){displaystyle S(z)={frac {z^{m}}{(1-z)^{m+1}}}Aleft({frac {z}{(1-z)^{2}}}right)}{displaystyle S(z)={frac {z^{m}}{(1-z)^{m+1}}}Aleft({frac {z}{(1-z)^{2}}}right)} [26] (see also the binomial transform and the Stirling transform).


There are also integral formulas for converting between a sequence's OGF, F(z){displaystyle F(z)}{displaystyle F(z)}, and its exponential generating function, or EGF, F^(z){displaystyle {widehat {F}}(z)}{displaystyle {widehat {F}}(z)}, and vice versa given by



F(z)=∫0∞F^(tz)e−tdt{displaystyle F(z)=int _{0}^{infty }{widehat {F}}(tz)e^{-t},dt}{displaystyle F(z)=int _{0}^{infty }{widehat {F}}(tz)e^{-t},dt}

F^(z)=12πππF(ze−ıϑ)eeıϑ,{displaystyle {widehat {F}}(z)={frac {1}{2pi }}int _{-pi }^{pi }Fleft(ze^{-imath vartheta }right)e^{e^{imath vartheta }},dvartheta ,}{displaystyle {widehat {F}}(z)={frac {1}{2pi }}int _{-pi }^{pi }Fleft(ze^{-imath vartheta }right)e^{e^{imath vartheta }},dvartheta ,}


provided that these integrals converge for appropriate values of z{displaystyle z}z.



Other applications


Generating functions are used to:



  • Find a closed formula for a sequence given in a recurrence relation. For example, consider Fibonacci numbers.

  • Find recurrence relations for sequences—the form of a generating function may suggest a recurrence formula.

  • Find relationships between sequences—if the generating functions of two sequences have a similar form, then the sequences themselves may be related.

  • Explore the asymptotic behaviour of sequences.

  • Prove identities involving sequences.

  • Solve enumeration problems in combinatorics and encoding their solutions. Rook polynomials are an example of an application in combinatorics.

  • Evaluate infinite sums.



Other generating functions



Examples


Examples of polynomial sequences generated by more complex generating functions include:



  • Appell polynomials

  • Chebyshev polynomials

  • Difference polynomials

  • Generalized Appell polynomials

  • Q-difference polynomials


Other sequences generated by more complex generating functions:



  • Double exponential generating functions. For example: Aitken's Array: Triangle of Numbers

  • Hadamard products of generating functions / diagonal generating functions and their corresponding integral transformations



Convolution polynomials


Knuth's article titled "Convolution Polynomials"[27] defines a generalized class of convolution polynomial sequences by their special generating functions of the form


F(z)x=exp⁡(xlog⁡F(z))=∑n≥0fn(x)zn,{displaystyle F(z)^{x}=exp left(xlog F(z)right)=sum _{ngeq 0}f_{n}(x)z^{n},}{displaystyle F(z)^{x}=exp left(xlog F(z)right)=sum _{ngeq 0}f_{n}(x)z^{n},}

for some analytic function F{displaystyle F}F with a power series expansion such that F(0)=1{displaystyle F(0)=1}{displaystyle F(0)=1}.
We say that a family of polynomials, f0,f1,f2,…{displaystyle f_{0},f_{1},f_{2},ldots }{displaystyle f_{0},f_{1},f_{2},ldots }, forms a convolution family if deg⁡{fn}≤n{displaystyle deg{f_{n}}leq n}{displaystyle deg{f_{n}}leq n} and if the following convolution condition holds for all x,y{displaystyle x,y}x,y and for all n≥0{displaystyle ngeq 0}ngeq 0:


fn(x+y)=fn(x)f0(y)+fn−1(x)f1(y)+⋯+f1(x)fn−1(y)+f0(x)fn(y).{displaystyle f_{n}(x+y)=f_{n}(x)f_{0}(y)+f_{n-1}(x)f_{1}(y)+cdots +f_{1}(x)f_{n-1}(y)+f_{0}(x)f_{n}(y).}{displaystyle f_{n}(x+y)=f_{n}(x)f_{0}(y)+f_{n-1}(x)f_{1}(y)+cdots +f_{1}(x)f_{n-1}(y)+f_{0}(x)f_{n}(y).}

We see that for non-identically zero convolution families, this definition is equivalent to requiring that the sequence have an ordinary generating function of the first form given above.


A sequence of convolution polynomials defined in the notation above has the following properties:



  • The sequence n!⋅fn(x){displaystyle n!cdot f_{n}(x)}{displaystyle n!cdot f_{n}(x)} is of binomial type

  • Special values of the sequence include fn(1)=[zn]F(z){displaystyle f_{n}(1)=[z^{n}]F(z)}{displaystyle f_{n}(1)=[z^{n}]F(z)} and fn(0)=δn,0{displaystyle f_{n}(0)=delta _{n,0}}{displaystyle f_{n}(0)=delta _{n,0}}, and

  • For arbitrary (fixed) x,y,t∈C{displaystyle x,y,tin mathbb {C} }{displaystyle x,y,tin mathbb {C} }, these polynomials satisfy convolution formulas of the form


fn(x+y)=∑k=0nfk(x)fn−k(y)fn(2x)=∑k=0nfk(x)fn−k(x)xnfn(x+y)=(x+y)∑k=0nkfk(x)fn−k(y)(x+y)fn(x+y+tn)x+y+tn=∑k=0nxfk(x+tk)x+tkyfn−k(y+t(n−k))y+t(n−k).{displaystyle {begin{aligned}f_{n}(x+y)&=sum _{k=0}^{n}f_{k}(x)f_{n-k}(y)\f_{n}(2x)&=sum _{k=0}^{n}f_{k}(x)f_{n-k}(x)\xnf_{n}(x+y)&=(x+y)sum _{k=0}^{n}kf_{k}(x)f_{n-k}(y)\{frac {(x+y)f_{n}(x+y+tn)}{x+y+tn}}&=sum _{k=0}^{n}{frac {xf_{k}(x+tk)}{x+tk}}{frac {yf_{n-k}(y+t(n-k))}{y+t(n-k)}}.end{aligned}}}{displaystyle {begin{aligned}f_{n}(x+y)&=sum _{k=0}^{n}f_{k}(x)f_{n-k}(y)\f_{n}(2x)&=sum _{k=0}^{n}f_{k}(x)f_{n-k}(x)\xnf_{n}(x+y)&=(x+y)sum _{k=0}^{n}kf_{k}(x)f_{n-k}(y)\{frac {(x+y)f_{n}(x+y+tn)}{x+y+tn}}&=sum _{k=0}^{n}{frac {xf_{k}(x+tk)}{x+tk}}{frac {yf_{n-k}(y+t(n-k))}{y+t(n-k)}}.end{aligned}}}

For a fixed non-zero parameter t∈C{displaystyle tin mathbb {C} }{displaystyle tin mathbb {C} }, we have modified generating functions for these convolution polynomial sequences given by


zFn(x+tn)(x+tn)=[zn]Ft(z)x,{displaystyle {frac {zF_{n}(x+tn)}{(x+tn)}}=[z^{n}]{mathcal {F}}_{t}(z)^{x},}{displaystyle {frac {zF_{n}(x+tn)}{(x+tn)}}=[z^{n}]{mathcal {F}}_{t}(z)^{x},}

where Ft(z){displaystyle {mathcal {F}}_{t}(z)}{displaystyle {mathcal {F}}_{t}(z)} is implicitly defined by a functional equation of the form Ft(z)=F(xFt(z)t){displaystyle {mathcal {F}}_{t}(z)=Fleft(x{mathcal {F}}_{t}(z)^{t}right)}{displaystyle {mathcal {F}}_{t}(z)=Fleft(x{mathcal {F}}_{t}(z)^{t}right)}.
Moreover, we can use matrix methods (as in the reference) to prove that given two convolution polynomial sequences, fn(x)⟩{displaystyle langle f_{n}(x)rangle }{displaystyle langle f_{n}(x)rangle } and gn(x)⟩{displaystyle langle g_{n}(x)rangle }{displaystyle langle g_{n}(x)rangle }, with respective corresponding generating functions, F(z)x{displaystyle F(z)^{x}}{displaystyle F(z)^{x}} and G(z)x{displaystyle G(z)^{x}}{displaystyle G(z)^{x}}, then for arbitrary t{displaystyle t}t we have the identity


[zn](G(z)F(zG(z)t))x=∑k=0nFk(x)Gn−k(x+tk).{displaystyle [z^{n}]left(G(z)Fleft(zG(z)^{t}right)right)^{x}=sum _{k=0}^{n}F_{k}(x)G_{n-k}(x+tk).}{displaystyle [z^{n}]left(G(z)Fleft(zG(z)^{t}right)right)^{x}=sum _{k=0}^{n}F_{k}(x)G_{n-k}(x+tk).}

Examples of convolution polynomial sequences include the binomial power series, Bt(z)=1+zBt(z)t{displaystyle {mathcal {B}}_{t}(z)=1+z{mathcal {B}}_{t}(z)^{t}}{displaystyle {mathcal {B}}_{t}(z)=1+z{mathcal {B}}_{t}(z)^{t}}, so-termed tree polynomials, the Bell numbers, B(n){displaystyle B(n)}{displaystyle B(n)}, the Laguerre polynomials, and the Stirling convolution polynomials.



Tables of special generating functions


An initial listing of special mathematical series is found here. A number of useful and special sequence generating functions are found in Section 5.4 and 7.4 of Concrete Mathematics and in Section 2.5 of Wilf's Generatingfunctionology. Other special generating functions of note include the entries in the next table, which is by no means complete.[28]






































































Formal power series Generating-function formula Notes
n≥0(m+nn)(Hn+m−Hm)zn{displaystyle sum _{ngeq 0}{binom {m+n}{n}}left(H_{n+m}-H_{m}right)z^{n}}{displaystyle sum _{ngeq 0}{binom {m+n}{n}}left(H_{n+m}-H_{m}right)z^{n}} 1(1−z)m+1ln⁡11−z{displaystyle {frac {1}{(1-z)^{m+1}}}ln {frac {1}{1-z}}}{displaystyle {frac {1}{(1-z)^{m+1}}}ln {frac {1}{1-z}}}
Hn{displaystyle H_{n}}H_{n} is a first-order harmonic number
n≥0Bnznn!{displaystyle sum _{ngeq 0}B_{n}{frac {z^{n}}{n!}}}{displaystyle sum _{ngeq 0}B_{n}{frac {z^{n}}{n!}}} zez−1{displaystyle {frac {z}{e^{z}-1}}}{displaystyle {frac {z}{e^{z}-1}}}
Bn{displaystyle B_{n}}B_{n} is a Bernoulli number
n≥0Fmnzn{displaystyle sum _{ngeq 0}F_{mn}z^{n}}{displaystyle sum _{ngeq 0}F_{mn}z^{n}} Fmz1−(Fm−1+Fm+1)z+(−1)mz2{displaystyle {frac {F_{m}z}{1-(F_{m-1}+F_{m+1})z+(-1)^{m}z^{2}}}}{displaystyle {frac {F_{m}z}{1-(F_{m-1}+F_{m+1})z+(-1)^{m}z^{2}}}}
Fn{displaystyle F_{n}}F_{n} is a Fibonacci number and m∈Z+{displaystyle min mathbb {Z} ^{+}}{displaystyle min mathbb {Z} ^{+}}
n≥0{nm}zn{displaystyle sum _{ngeq 0}left{{begin{matrix}n\mend{matrix}}right}z^{n}}{displaystyle sum _{ngeq 0}left{{begin{matrix}n\mend{matrix}}right}z^{n}} (z−1)−=zm(1−z)(1−2z)⋯(1−mz){displaystyle (z^{-1})^{overline {-m}}={frac {z^{m}}{(1-z)(1-2z)cdots (1-mz)}}}{displaystyle (z^{-1})^{overline {-m}}={frac {z^{m}}{(1-z)(1-2z)cdots (1-mz)}}}
xn¯{displaystyle x^{overline {n}}}x^{overline{n}} denotes the rising factorial, or Pochhammer symbol and some integer m≥0{displaystyle mgeq 0}mgeq 0
n≥0[nm]zn{displaystyle sum _{ngeq 0}left[{begin{matrix}n\mend{matrix}}right]z^{n}}{displaystyle sum _{ngeq 0}left[{begin{matrix}n\mend{matrix}}right]z^{n}}
zm¯=z(z+1)⋯(z+m−1){displaystyle z^{overline {m}}=z(z+1)cdots (z+m-1)}{displaystyle z^{overline {m}}=z(z+1)cdots (z+m-1)}
n≥1(−1)n−14n(4n−2)B2nz2n(2n)⋅(2n)!{displaystyle sum _{ngeq 1}{frac {(-1)^{n-1}4^{n}(4^{n}-2)B_{2n}z^{2n}}{(2n)cdot (2n)!}}}{displaystyle sum _{ngeq 1}{frac {(-1)^{n-1}4^{n}(4^{n}-2)B_{2n}z^{2n}}{(2n)cdot (2n)!}}}
ln⁡tan⁡(z)z{displaystyle ln {frac {tan(z)}{z}}}{displaystyle ln {frac {tan(z)}{z}}}
n≥0(1/2)n¯z2n(2n+1)⋅n!{displaystyle sum _{ngeq 0}{frac {(1/2)^{overline {n}}z^{2n}}{(2n+1)cdot n!}}}{displaystyle sum _{ngeq 0}{frac {(1/2)^{overline {n}}z^{2n}}{(2n+1)cdot n!}}}
z−1arcsin⁡(z){displaystyle z^{-1}arcsin(z)}{displaystyle z^{-1}arcsin(z)}
n≥0Hn(s)zn{displaystyle sum _{ngeq 0}H_{n}^{(s)}z^{n}}{displaystyle sum _{ngeq 0}H_{n}^{(s)}z^{n}} Lis⁡(z)1−z{displaystyle {frac {operatorname {Li} _{s}(z)}{1-z}}}{displaystyle {frac {operatorname {Li} _{s}(z)}{1-z}}}
Lis⁡(z){displaystyle operatorname {Li} _{s}(z)}operatorname {Li} _{s}(z) is the polylogarithm function and Hn(s){displaystyle H_{n}^{(s)}}{displaystyle H_{n}^{(s)}} is a generalized harmonic number for (s)>1{displaystyle Re (s)>1}Re (s)>1
n≥0nmzn{displaystyle sum _{ngeq 0}n^{m}z^{n}}{displaystyle sum _{ngeq 0}n^{m}z^{n}} 0≤j≤m{mj}j!⋅zj(1−z)j+1{displaystyle sum _{0leq jleq m}left{{begin{matrix}m\jend{matrix}}right}{frac {j!cdot z^{j}}{(1-z)^{j+1}}}}{displaystyle sum _{0leq jleq m}left{{begin{matrix}m\jend{matrix}}right}{frac {j!cdot z^{j}}{(1-z)^{j+1}}}}
{nm}{displaystyle left{{begin{matrix}n\mend{matrix}}right}}{displaystyle left{{begin{matrix}n\mend{matrix}}right}} is a Stirling number of the second kind and where the individual terms in the expansion satisfy zi(1−z)i+1=∑k=0i(ik)(−1)k−i(1−z)k+1{displaystyle {frac {z^{i}}{(1-z)^{i+1}}}=sum _{k=0}^{i}{binom {i}{k}}{frac {(-1)^{k-i}}{(1-z)^{k+1}}}}{displaystyle {frac {z^{i}}{(1-z)^{i+1}}}=sum _{k=0}^{i}{binom {i}{k}}{frac {(-1)^{k-i}}{(1-z)^{k+1}}}}
k<n(n−kk)nn−kzk{displaystyle sum _{k<n}{binom {n-k}{k}}{frac {n}{n-k}}z^{k}}{displaystyle sum _{k<n}{binom {n-k}{k}}{frac {n}{n-k}}z^{k}} (1+1+4z2)n+(1−1+4z2)n{displaystyle left({frac {1+{sqrt {1+4z}}}{2}}right)^{n}+left({frac {1-{sqrt {1+4z}}}{2}}right)^{n}}{displaystyle left({frac {1+{sqrt {1+4z}}}{2}}right)^{n}+left({frac {1-{sqrt {1+4z}}}{2}}right)^{n}}
n1,…,nm≥0min(n1,…,nm)z1n1⋯zmnm{displaystyle sum _{n_{1},ldots ,n_{m}geq 0}min(n_{1},ldots ,n_{m})z_{1}^{n_{1}}cdots z_{m}^{n_{m}}}{displaystyle sum _{n_{1},ldots ,n_{m}geq 0}min(n_{1},ldots ,n_{m})z_{1}^{n_{1}}cdots z_{m}^{n_{m}}} z1⋯zm(1−z1)⋯(1−zm)(1−z1⋯zm){displaystyle {frac {z_{1}cdots z_{m}}{(1-z_{1})cdots (1-z_{m})(1-z_{1}cdots z_{m})}}}{displaystyle {frac {z_{1}cdots z_{m}}{(1-z_{1})cdots (1-z_{m})(1-z_{1}cdots z_{m})}}} The two-variable case is given by M(w,z):=∑m,n≥0min(m,n)wmzn=wz(1−w)(1−z)(1−wz){displaystyle M(w,z):=sum _{m,ngeq 0}min(m,n)w^{m}z^{n}={frac {wz}{(1-w)(1-z)(1-wz)}}}{displaystyle M(w,z):=sum _{m,ngeq 0}min(m,n)w^{m}z^{n}={frac {wz}{(1-w)(1-z)(1-wz)}}}
n≥0(sn)zn{displaystyle sum _{ngeq 0}{binom {s}{n}}z^{n}}{displaystyle sum _{ngeq 0}{binom {s}{n}}z^{n}} (1+z)s{displaystyle (1+z)^{s}}{displaystyle (1+z)^{s}}
s∈C{displaystyle sin mathbb {C} }{displaystyle sin mathbb {C} }
n≥0(nk)zn{displaystyle sum _{ngeq 0}{binom {n}{k}}z^{n}}{displaystyle sum _{ngeq 0}{binom {n}{k}}z^{n}} zk(1−z)k+1{displaystyle {frac {z^{k}}{(1-z)^{k+1}}}}{displaystyle {frac {z^{k}}{(1-z)^{k+1}}}}
k∈N{displaystyle kin mathbb {N} }kin mathbb {N}


History


George Polya writes in Mathematics and plausible reasoning:


The name "generating function" is due to Laplace. Yet, without giving it a name, Euler used the device of generating functions long before Laplace [..]. He applied this mathematical tool to several problems in Combinatory Analysis and the Theory of Numbers.


See also



  • Moment-generating function

  • Probability-generating function

  • Generating function transformation

  • Stanley's reciprocity theorem

  • Applications to Partition (number theory)

  • Combinatorial principles

  • Cyclic sieving

  • Z-transform



Notes





  1. ^ Donald E. Knuth, The Art of Computer Programming, Volume 1 Fundamental Algorithms (Third Edition) Addison-Wesley. .mw-parser-output cite.citation{font-style:inherit}.mw-parser-output .citation q{quotes:"""""""'""'"}.mw-parser-output .citation .cs1-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/6/65/Lock-green.svg/9px-Lock-green.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .citation .cs1-lock-limited a,.mw-parser-output .citation .cs1-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Lock-gray-alt-2.svg/9px-Lock-gray-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .citation .cs1-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Lock-red-alt-2.svg/9px-Lock-red-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration{color:#555}.mw-parser-output .cs1-subscription span,.mw-parser-output .cs1-registration span{border-bottom:1px dotted;cursor:help}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Wikisource-logo.svg/12px-Wikisource-logo.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output code.cs1-code{color:inherit;background:inherit;border:inherit;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;font-size:100%}.mw-parser-output .cs1-visible-error{font-size:100%}.mw-parser-output .cs1-maint{display:none;color:#33aa33;margin-left:0.3em}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration,.mw-parser-output .cs1-format{font-size:95%}.mw-parser-output .cs1-kern-left,.mw-parser-output .cs1-kern-wl-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right,.mw-parser-output .cs1-kern-wl-right{padding-right:0.2em}
    ISBN 0-201-89683-4. Section 1.2.9: "Generating Functions".



  2. ^ This alternative term can already be found in E.N. Gilbert (1956), "Enumeration of Labeled graphs", Canadian Journal of Mathematics 3, p. 405–411, but its use is rare before the year 2000; since then it appears to be increasing.


  3. ^ Flajolet & Sedgewick (2009) p.95


  4. ^ Apostol, Tom M. (1976), Introduction to analytic number theory, Undergraduate Texts in Mathematics, New York-Heidelberg: Springer-Verlag, ISBN 978-0-387-90163-3, MR 0434929, Zbl 0335.10001 pp.42–43


  5. ^ Wilf (1994) p.56


  6. ^ Wilf (1994) p.59


  7. ^ Hardy and Wright (2008). An Introduction to the Theory of Numbers (Sixth ed.). New York: Oxford University Press. p. 339.


  8. ^ Spivey, Michael Z. (2007). "Combinatorial Sums and Finite Differences". Discrete Math. 307 (24): 3130–3146. doi:10.1016/j.disc.2007.03.052. MR 2370116.


  9. ^ Mathar, R. J. (2012). "Yet another table of integrals". arXiv:1207.5845. v4 eq. (0.4)


  10. ^ See Table 265 in Section 6.1 of Concrete Mathematics for finite sum identities involving the Stirling number triangles.


  11. ^ See section 2.4 in Lando's book Lectures on Generating Functions (2002).


  12. ^ Example from Section 6.3 of R. P. Stanley's Enumerative Combinatorics (Volume 2).


  13. ^ See Section 1.2.9 in Knuth's The Art of Computer Programming (Vol. 1).


  14. ^ Solution to exercise 7.36 on page 569 in Graham, Knuth and Patshnik.


  15. ^ Flajolet and Sedgewick (2010). Analytic Combinatorics. New York: Cambridge University Press. ISBN 978-0-521-89806-5. (Section B.4)


  16. ^ Schneider, C. (2007). "Symbolic Summation Assists Combinatorics". Sem.Lothar.Combin. 56: 1–36.


  17. ^ See P. Flajolet's article Combinatorial aspects of continued fractions (1980) and also refer to H. S. Wall's Analytic theory of continued fractions (1948) for more complete information on the properties of J-fractions.


  18. ^ See the following articles:


    • Continued Fractions for Square Series Generating Functions (2016)


    • Jacobi Type Continued Fractions for the Ordinary Generating Functions of Generalized Factorial Functions (2017)


    • Jacobi-Type Continued Fractions and Congruences for Binomial Coefficients Modulo Integers h≥2{displaystyle hgeq 2}{displaystyle hgeq 2} (2017)




  19. ^ "Lambert series identity". Math Overflow. 2017.


  20. ^ Good, I. J. (1986). "On applications of symmetric Dirichlet distributions and their mixtures to contingency tables". Annals of Statistics. 4 (6): 1159–1189. doi:10.1214/aos/1176343649.


  21. ^ See the usage of these terms in Section 7.4 of Concrete Mathematics on special sequence generating functions.


  22. ^ Section 8.3 in Concrete Mathematics.


  23. ^ See Example 6 in Section 7.3 of Concrete Mathematics for another method and the complete setup of this problem using generating functions. This more "convoluted" approach is given in Section 7.5 of the same reference.


  24. ^ See Section 5 of Lando's Lectures on Generating Functions.


  25. ^ See Section 19.12 of Hardy and Wright's classic book An introduction to the theory of numbers.


  26. ^ Solution to exercise 5.71 on page 535 in Concrete Mathematics by Graham, Knuth and Patashnik.


  27. ^ Knuth, D. E. (1992). "Convolution Polynomials" (PDF). Mathematica J. 2: 67–78.


  28. ^ See also the 1031 Generating Functions found in the article referenced here.




References




  • Doubilet, Peter; Rota, Gian-Carlo; Stanley, Richard (1972). "On the foundations of combinatorial theory. VI. The idea of generating function". Proceedings of the Sixth Berkeley Symposium on Mathematical Statistics and Probability. 2: 267–318. Zbl 0267.05002. Reprinted in Rota, Gian-Carlo (1975). "3. The idea of generating function". Finite Operator Calculus. With the collaboration of P. Doubilet, C. Greene, D. Kahaner, A. Odlyzko and R. Stanley. Academic Press. pp. 83–134. ISBN 0-12-596650-4. Zbl 0328.05007.


  • Flajolet, Philippe; Sedgewick, Robert (2009). Analytic Combinatorics (PDF). Cambridge University Press. ISBN 978-0-521-89806-5. Zbl 1165.05001.


  • Goulden, Ian P.; Jackson, David M. (2004). Combinatorial Enumeration. Dover Publications. ISBN 978-0486435978.


  • Ronald L. Graham; Donald E. Knuth; Oren Patashnik (1994). "Chapter 7: Generating Functions". Concrete Mathematics. A foundation for computer science (second ed.). Addison-Wesley. pp. 320–380. ISBN 0-201-55802-5. Zbl 0836.00001.


  • Wilf, Herbert S. (1994). Generatingfunctionology (2nd ed.). Boston, MA: Academic Press. ISBN 0-12-751956-4. Zbl 0831.05001.

  • Martin Aigner. A Course in Enumeration



External links




  • "Introduction To Ordinary Generating Functions" by Mike Zabrocki, York University, Mathematics and Statistics


  • Hazewinkel, Michiel, ed. (2001) [1994], "Generating function", Encyclopedia of Mathematics, Springer Science+Business Media B.V. / Kluwer Academic Publishers, ISBN 978-1-55608-010-4


  • Generating Functions, Power Indices and Coin Change at cut-the-knot


  • "Generating Functions" by Ed Pegg, Jr., Wolfram Demonstrations Project, 2007.




這個網誌中的熱門文章

12.7 cm/40 Type 89 naval gun

Shark

Wiciokrzew