Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Generating function

From Wikipedia, the free encyclopedia
(Redirected fromGenerating series)
Formal power series; coefficients encode information about a sequence indexed by natural numbers
This article is about generating functions in mathematics. For generating functions in classical mechanics, seeGenerating function (physics). For generators in computer programming, seeGenerator (computer programming). For the moment generating function in statistics, seeMoment generating function.

Inmathematics, agenerating function is a representation of aninfinite sequence of numbers as thecoefficients of aformal power series. Generating functions are often expressed inclosed form (rather than as a series), by some expression involving operations on the formal series.

There are various types of generating functions, includingordinary generating functions,exponential generating functions,Lambert series,Bell series, andDirichlet series. 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 sometimes calledgenerating series,[1] in that a series of terms can be said to be the generator of its sequence of term coefficients.

History

[edit]

Generating functions were first introduced byAbraham de Moivre in 1730, in order to solve the general linear recurrence problem.[2]

George Pólya writes inMathematics and plausible reasoning:

The name "generating function" is due toLaplace. 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 theTheory of Numbers.

Definition

[edit]

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 Pólya,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)

Convergence

[edit]

Unlike an ordinary series, theformalpower series is not required toconverge: in fact, the generating function is not actually regarded as afunction, and the "variable" remains anindeterminate. One can generalize to formal power series in more than one indeterminate, to encode information about infinite multi-dimensional arrays of numbers. Thus generating functions are not functions in the formal sense of a mapping from adomain to acodomain.

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 ofx, and which has the formal series as itsseries expansion; this explains the designation "generating functions". However such interpretation is not required to be possible, because formal series are not required to give aconvergent series when a nonzero numeric value is substituted for x.

Limitations

[edit]

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.

Types

[edit]

Ordinary generating function (OGF)

[edit]

When the termgenerating function is used without qualification, it is usually taken to mean an ordinary generating function. Theordinary generating function of a sequencean is:G(an;x)=n=0anxn.{\displaystyle G(a_{n};x)=\sum _{n=0}^{\infty }a_{n}x^{n}.}Ifan is theprobability mass function of adiscrete random variable, then its ordinary generating function is called aprobability-generating function.

Exponential generating function (EGF)

[edit]

Theexponential generating function of a sequencean isEG(an;x)=n=0anxnn!.{\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 forcombinatorial enumeration problems that involve labelled objects.[3]

Another benefit of exponential generating functions is that they are useful in transferring linearrecurrence relations to the realm ofdifferential equations. For example, take theFibonacci sequence{fn} that satisfies the linear recurrence relationfn+2 =fn+1 +fn. The corresponding exponential generating function has the formEF(x)=n=0fnn!xn{\displaystyle \operatorname {EF} (x)=\sum _{n=0}^{\infty }{\frac {f_{n}}{n!}}x^{n}}

and its derivatives can readily be shown to satisfy the differential equationEF″(x) = EF(x) + EF(x) as a direct analogue with the recurrence relation above. In this view, the factorial termn! is merely a counter-term to normalise the derivative operator acting onxn.

Poisson generating function

[edit]

ThePoisson generating function of a sequencean isPG(an;x)=n=0anexxnn!=exEG(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).}

Lambert series

[edit]
Main article:Lambert series

TheLambert series of a sequencean isLG(an;x)=n=1anxn1xn.{\displaystyle \operatorname {LG} (a_{n};x)=\sum _{n=1}^{\infty }a_{n}{\frac {x^{n}}{1-x^{n}}}.}Note that in a Lambert series the indexn starts at 1, not at 0, as the first term would otherwise be undefined.

The Lambert series coefficients in the power series expansionsbn:=[xn]LG(an;x){\displaystyle b_{n}:=[x^{n}]\operatorname {LG} (a_{n};x)}for integersn ≥ 1 are related by thedivisor sumbn=d|nad.{\displaystyle b_{n}=\sum _{d|n}a_{d}.}Themain article provides several more classical, or at least well-known examples related to specialarithmetic functions innumber theory. As an example of a Lambert series identity not given in the main article, we can show that for|x|, |xq| < 1 we have that[4]n=1qnxn1xn=n=1qnxn21qxn+n=1qnxn(n+1)1xn,{\displaystyle \sum _{n=1}^{\infty }{\frac {q^{n}x^{n}}{1-x^{n}}}=\sum _{n=1}^{\infty }{\frac {q^{n}x^{n^{2}}}{1-qx^{n}}}+\sum _{n=1}^{\infty }{\frac {q^{n}x^{n(n+1)}}{1-x^{n}}},}

where we have the special case identity for the generating function of thedivisor function,d(n) ≡σ0(n), given byn=1xn1xn=n=1xn2(1+xn)1xn.{\displaystyle \sum _{n=1}^{\infty }{\frac {x^{n}}{1-x^{n}}}=\sum _{n=1}^{\infty }{\frac {x^{n^{2}}\left(1+x^{n}\right)}{1-x^{n}}}.}

Bell series

[edit]

TheBell series of a sequencean is an expression in terms of both an indeterminatex and a primep and is given by:[5]BGp(an;x)=n=0apnxn.{\displaystyle \operatorname {BG} _{p}(a_{n};x)=\sum _{n=0}^{\infty }a_{p^{n}}x^{n}.}

Dirichlet series generating functions (DGFs)

[edit]

Formal Dirichlet series are often classified as generating functions, although they are not strictly formal power series. TheDirichlet series generating function of a sequencean is:[6]DG(an;s)=n=1anns.{\displaystyle \operatorname {DG} (a_{n};s)=\sum _{n=1}^{\infty }{\frac {a_{n}}{n^{s}}}.}

The Dirichlet series generating function is especially useful whenan is amultiplicative function, in which case it has anEuler product expression[7] in terms of the function's Bell series:DG(an;s)=pBGp(an;ps).{\displaystyle \operatorname {DG} (a_{n};s)=\prod _{p}\operatorname {BG} _{p}(a_{n};p^{-s})\,.}

Ifan is aDirichlet character then its Dirichlet series generating function is called aDirichletL-series. We also have a relation between the pair of coefficients in theLambert 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}}if and only ifDG(an;s)ζ(s)=DG(bn;s),{\displaystyle \operatorname {DG} (a_{n};s)\zeta (s)=\operatorname {DG} (b_{n};s),}whereζ(s) is theRiemann zeta function.[8]

The sequenceak generated by aDirichlet series generating function (DGF) corresponding to:DG(ak;s)=ζ(s)m{\displaystyle \operatorname {DG} (a_{k};s)=\zeta (s)^{m}}has the ordinary generating function:k=1k=nakxk=x+(m1)2anxa+(m2)a=2b=2abnxab+(m3)a=2c=2b=2abcnxabc+(m4)a=2b=2c=2d=2abcdnxabcd+{\displaystyle \sum _{k=1}^{k=n}a_{k}x^{k}=x+{\binom {m}{1}}\sum _{2\leq a\leq n}x^{a}+{\binom {m}{2}}{\underset {ab\leq n}{\sum _{a=2}^{\infty }\sum _{b=2}^{\infty }}}x^{ab}+{\binom {m}{3}}{\underset {abc\leq n}{\sum _{a=2}^{\infty }\sum _{c=2}^{\infty }\sum _{b=2}^{\infty }}}x^{abc}+{\binom {m}{4}}{\underset {abcd\leq n}{\sum _{a=2}^{\infty }\sum _{b=2}^{\infty }\sum _{c=2}^{\infty }\sum _{d=2}^{\infty }}}x^{abcd}+\cdots }

Polynomial sequence generating functions

[edit]

The idea of generating functions can be extended to sequences of other objects. Thus, for example, polynomial sequences ofbinomial type are generated by:exf(t)=n=0pn(x)n!tn{\displaystyle e^{xf(t)}=\sum _{n=0}^{\infty }{\frac {p_{n}(x)}{n!}}t^{n}}wherepn(x) is a sequence of polynomials andf(t) is a function of a certain form.Sheffer sequences are generated in a similar way. See the main articlegeneralized Appell polynomials for more information.

Examples ofpolynomial sequences generated by more complex generating functions include:

Other generating functions

[edit]

Other sequences generated by more complex generating functions include:

Convolution polynomials

[edit]

Knuth's article titled "Convolution Polynomials"[9] defines a generalized class ofconvolution polynomial sequences by their special generating functions of the formF(z)x=exp(xlogF(z))=n=0fn(x)zn,{\displaystyle F(z)^{x}=\exp {\bigl (}x\log F(z){\bigr )}=\sum _{n=0}^{\infty }f_{n}(x)z^{n},}for some analytic functionF with a power series expansion such thatF(0) = 1.

We say that a family of polynomials,f0,f1,f2, ..., forms aconvolution family ifdegfnn and if the following convolution condition holds for allx,y and for alln ≥ 0:fn(x+y)=fn(x)f0(y)+fn1(x)f1(y)++f1(x)fn1(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).}

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:

fn(x+y)=k=0nfk(x)fnk(y)fn(2x)=k=0nfk(x)fnk(x)xnfn(x+y)=(x+y)k=0nkfk(x)fnk(y)(x+y)fn(x+y+tn)x+y+tn=k=0nxfk(x+tk)x+tkyfnk(y+t(nk))y+t(nk).{\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 parametertC{\displaystyle t\in \mathbb {C} }, we have modified generating functions for these convolution polynomial sequences given byzFn(x+tn)(x+tn)=[zn]Ft(z)x,{\displaystyle {\frac {zF_{n}(x+tn)}{(x+tn)}}=\left[z^{n}\right]{\mathcal {F}}_{t}(z)^{x},}where𝓕t(z) is implicitly defined by afunctional equation of the form𝓕t(z) =F(x𝓕t(z)t). Moreover, we can use matrix methods (as in the reference) to prove that given two convolution polynomial sequences,fn(x) ⟩ andgn(x) ⟩, with respective corresponding generating functions,F(z)x andG(z)x, then for arbitraryt we have the identity[zn](G(z)F(zG(z)t))x=k=0nFk(x)Gnk(x+tk).{\displaystyle \left[z^{n}\right]\left(G(z)F\left(zG(z)^{t}\right)\right)^{x}=\sum _{k=0}^{n}F_{k}(x)G_{n-k}(x+tk).}

Examples of convolution polynomial sequences include thebinomial power series,𝓑t(z) = 1 +z𝓑t(z)t, so-termedtree polynomials, theBell numbers,B(n), theLaguerre polynomials, and theStirling convolution polynomials.

Ordinary generating functions

[edit]

Examples for simple sequences

[edit]

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 thePoincaré polynomial and others.

A fundamental generating function is that of the constant sequence1, 1, 1, 1, 1, 1, 1, 1, 1, ..., whose ordinary generating function is thegeometric seriesn=0xn=11x.{\displaystyle \sum _{n=0}^{\infty }x^{n}={\frac {1}{1-x}}.}

The left-hand side is theMaclaurin series expansion of the right-hand side. Alternatively, the equality can be justified by multiplying the power series on the left by1 −x, and checking that the result is the constant power series 1 (in other words, that all coefficients except the one ofx0 are equal to 0). Moreover, there can be no other power series with this property. The left-hand side therefore designates themultiplicative inverse of1 −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 substitutionxax gives the generating function for thegeometric sequence1,a,a2,a3, ... for any constanta:n=0(ax)n=11ax.{\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}}.}

One can also introduce regular gaps in the sequence by replacingx by some power ofx, so for instance for the sequence1, 0, 1, 0, 1, 0, 1, 0, ... (which skips overx,x3,x5, ...) one gets the generating functionn=0x2n=11x2.{\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 tox and making a change of running variablenn + 1, one sees that the coefficients form the sequence1, 2, 3, 4, 5, ..., so one hasn=0(n+1)xn=1(1x)2,{\displaystyle \sum _{n=0}^{\infty }(n+1)x^{n}={\frac {1}{(1-x)^{2}}},}

and the third power has as coefficients thetriangular numbers1, 3, 6, 10, 15, 21, ... whose termn is thebinomial coefficient(n + 2
2
)
, so thatn=0(n+22)xn=1(1x)3.{\displaystyle \sum _{n=0}^{\infty }{\binom {n+2}{2}}x^{n}={\frac {1}{(1-x)^{3}}}.}

More generally, for any non-negative integerk and non-zero real valuea, it is true thatn=0an(n+kk)xn=1(1ax)k+1.{\displaystyle \sum _{n=0}^{\infty }a^{n}{\binom {n+k}{k}}x^{n}={\frac {1}{(1-ax)^{k+1}}}\,.}

Since2(n+22)3(n+11)+(n0)=2(n+1)(n+2)23(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},}

one can find the ordinary generating function for the sequence0, 1, 4, 9, 16, ... ofsquare numbers by linear combination of binomial-coefficient generating sequences:G(n2;x)=n=0n2xn=2(1x)33(1x)2+11x=x(x+1)(1x)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 thegeometric series in the following form:G(n2;x)=n=0n2xn=n=0n(n1)xn+n=0nxn=x2D2[11x]+xD[11x]=2x2(1x)3+x(1x)2=x(x+1)(1x)3.{\displaystyle {\begin{aligned}G(n^{2};x)&=\sum _{n=0}^{\infty }n^{2}x^{n}\\[4px]&=\sum _{n=0}^{\infty }n(n-1)x^{n}+\sum _{n=0}^{\infty }nx^{n}\\[4px]&=x^{2}D^{2}\left[{\frac {1}{1-x}}\right]+xD\left[{\frac {1}{1-x}}\right]\\[4px]&={\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 integersm ≥ 1 that[10][11]nm=j=0m{mj}n!(nj)!,{\displaystyle n^{m}=\sum _{j=0}^{m}{\begin{Bmatrix}m\\j\end{Bmatrix}}{\frac {n!}{(n-j)!}},}

where{n
k
}
denote theStirling numbers of the second kind and where the generating functionn=0n!(nj)!zn=j!zj(1z)j+1,{\displaystyle \sum _{n=0}^{\infty }{\frac {n!}{(n-j)!}}\,z^{n}={\frac {j!\cdot z^{j}}{(1-z)^{j+1}}},}

so that we can form the analogous generating functions over the integralmth powers generalizing the result in the square case above. In particular, since we can writezk(1z)k+1=i=0k(ki)(1)ki(1z)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 theStirling numbers to obtain that[12]n=0nmzn=j=0m{m+1j+1}(1)mjj!(1z)j+1.{\displaystyle \sum _{n=0}^{\infty }n^{m}z^{n}=\sum _{j=0}^{m}{\begin{Bmatrix}m+1\\j+1\end{Bmatrix}}{\frac {(-1)^{m-j}j!}{(1-z)^{j+1}}}.}

Rational functions

[edit]
Main article:Linear recursive sequence

The ordinary generating function of a sequence can be expressed as arational function (the ratio of two finite-degree polynomials) if and only if the sequence is alinear 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 linearfinite 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 deriveBinet's formula for theFibonacci numbers via generating function techniques.

We also notice that the class of rational generating functions precisely corresponds to the generating functions that enumeratequasi-polynomial sequences of the form[13]fn=p1(n)ρ1n++p(n)ρn,{\displaystyle f_{n}=p_{1}(n)\rho _{1}^{n}+\cdots +p_{\ell }(n)\rho _{\ell }^{n},}

where the reciprocal roots,ρiC{\displaystyle \rho _{i}\in \mathbb {C} }, are fixed scalars and wherepi(n) is a polynomial inn for all1 ≤i.

In general,Hadamard products of rational functions produce rational generating functions. Similarly, ifF(s,t):=m,n0f(m,n)wmzn{\displaystyle F(s,t):=\sum _{m,n\geq 0}f(m,n)w^{m}z^{n}}

is a bivariate rational generating function, then its correspondingdiagonal generating function,diag(F):=n=0f(n,n)zn,{\displaystyle \operatorname {diag} (F):=\sum _{n=0}^{\infty }f(n,n)z^{n},}

isalgebraic. For example, if we let[14]F(s,t):=i,j0(i+ji)sitj=11st,{\displaystyle F(s,t):=\sum _{i,j\geq 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 formuladiag(F)=n=0(2nn)zn=114z.{\displaystyle \operatorname {diag} (F)=\sum _{n=0}^{\infty }{\binom {2n}{n}}z^{n}={\frac {1}{\sqrt {1-4z}}}.}

This result is computed in many ways, includingCauchy's integral formula orcontour integration, taking complexresidues, or by direct manipulations offormal power series in two variables.

Operations on generating functions

[edit]

Multiplication yields convolution

[edit]
Main article:Cauchy product

Multiplication of ordinary generating functions yields a discreteconvolution (theCauchy product) of the sequences. For example, the sequence of cumulative sums (compare to the slightly more generalEuler–Maclaurin formula)(a0,a0+a1,a0+a1+a2,){\displaystyle (a_{0},a_{0}+a_{1},a_{0}+a_{1}+a_{2},\ldots )}of a sequence with ordinary generating functionG(an;x) has the generating functionG(an;x)11x{\displaystyle G(a_{n};x)\cdot {\frac {1}{1-x}}}because1/1 −x is the ordinary generating function for the sequence(1, 1, ...). See also thesection 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

[edit]

For integersm ≥ 1, we have the following two analogous identities for the modified generating functions enumerating the shifted sequence variants ofgnm andgn +m, respectively:zmG(z)=n=mgnmznG(z)g0g1zgm1zm1zm=n=0gn+mzn.{\displaystyle {\begin{aligned}&z^{m}G(z)=\sum _{n=m}^{\infty }g_{n-m}z^{n}\\[4px]&{\frac {G(z)-g_{0}-g_{1}z-\cdots -g_{m-1}z^{m-1}}{z^{m}}}=\sum _{n=0}^{\infty }g_{n+m}z^{n}.\end{aligned}}}

Differentiation and integration of generating functions

[edit]

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+1znzG(z)=n=0ngnzn0zG(t)dt=n=1gn1nzn.{\displaystyle {\begin{aligned}G'(z)&=\sum _{n=0}^{\infty }(n+1)g_{n+1}z^{n}\\[4px]z\cdot G'(z)&=\sum _{n=0}^{\infty }ng_{n}z^{n}\\[4px]\int _{0}^{z}G(t)\,dt&=\sum _{n=1}^{\infty }{\frac {g_{n-1}}{n}}z^{n}.\end{aligned}}}

The differentiation–multiplication operation of the second identity can be repeatedk times to multiply the sequence bynk, but that requires alternating between differentiation and multiplication. If instead doingk differentiations in sequence, the effect is to multiply by thekthfalling factorial:zkG(k)(z)=n=0nk_gnzn=n=0n(n1)(nk+1)gnznfor all kN.{\displaystyle z^{k}G^{(k)}(z)=\sum _{n=0}^{\infty }n^{\underline {k}}g_{n}z^{n}=\sum _{n=0}^{\infty }n(n-1)\dotsb (n-k+1)g_{n}z^{n}\quad {\text{for all }}k\in \mathbb {N} .}

Using theStirling numbers of the second kind, that can be turned into another formula for multiplying bynk{\displaystyle n^{k}} as follows (see the main article ongenerating function transformations):j=0k{kj}zjF(j)(z)=n=0nkfnznfor all kN.{\displaystyle \sum _{j=0}^{k}{\begin{Bmatrix}k\\j\end{Bmatrix}}z^{j}F^{(j)}(z)=\sum _{n=0}^{\infty }n^{k}f_{n}z^{n}\quad {\text{for all }}k\in \mathbb {N} .}

A negative-order reversal of this sequence powers formula corresponding to the operation of repeated integration is defined by thezeta series transformation and its generalizations defined as a derivative-basedtransformation of generating functions, or alternately termwise by and performing anintegral transformation on the sequence generating function. Related operations of performingfractional integration on a sequence generating function are discussedhere.

Enumerating arithmetic progressions of sequences

[edit]

In this section we give formulas for generating functions enumerating the sequence{fan +b} given an ordinary generating functionF(z), wherea ≥ 2,0 ≤b <a, anda andb are integers (see themain article on transformations). Fora = 2, this is simply the familiar decomposition of a function intoeven and odd parts (i.e., even and odd powers):n=0f2nz2n=F(z)+F(z)2n=0f2n+1z2n+1=F(z)F(z)2.{\displaystyle {\begin{aligned}\sum _{n=0}^{\infty }f_{2n}z^{2n}&={\frac {F(z)+F(-z)}{2}}\\[4px]\sum _{n=0}^{\infty }f_{2n+1}z^{2n+1}&={\frac {F(z)-F(-z)}{2}}.\end{aligned}}}

More generally, suppose thata ≥ 3 and thatωa = exp2πi/a denotes theathprimitive root of unity. Then, as an application of thediscrete Fourier transform, we have the formula[15]n=0fan+bzan+b=1am=0a1ωambF(ωamz).{\displaystyle \sum _{n=0}^{\infty }f_{an+b}z^{an+b}={\frac {1}{a}}\sum _{m=0}^{a-1}\omega _{a}^{-mb}F\left(\omega _{a}^{m}z\right).}

For integersm ≥ 1, another useful formula providing somewhatreversed floored arithmetic progressions — effectively repeating each coefficientm times — are generated by the identity[16]n=0fnmzn=1zm1zF(zm)=(1+z++zm2+zm1)F(zm).{\displaystyle \sum _{n=0}^{\infty }f_{\left\lfloor {\frac {n}{m}}\right\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

[edit]

Definitions

[edit]

A formal power series (or function)F(z) is said to beholonomic if it satisfies a linear differential equation of the form[17]c0(z)F(r)(z)+c1(z)F(r1)(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,}

where the coefficientsci(z) are in the field of rational functions,C(z){\displaystyle \mathbb {C} (z)}. Equivalently,F(z){\displaystyle F(z)} is holonomic if the vector space overC(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) are polynomials inz. Thus we can see an equivalent condition that a generating function is holonomic if its coefficients satisfy aP-recurrence of the formc^s(n)fn+s+c^s1(n)fn+s1++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,}

for all large enoughnn0 and where theĉi(n) are fixed finite-degree polynomials inn. In other words, the properties that a sequence beP-recursive and have a holonomic generating function are equivalent. Holonomic functions are closed under theHadamard product operation on generating functions.

Examples

[edit]

The functionsez,logz,cosz,arcsinz,1+z{\displaystyle {\sqrt {1+z}}}, thedilogarithm functionLi2(z), thegeneralized hypergeometric functionspFq(...; ...;z) and the functions defined by the power seriesn=0zn(n!)2{\displaystyle \sum _{n=0}^{\infty }{\frac {z^{n}}{(n!)^{2}}}}

and the non-convergentn=0n!zn{\displaystyle \sum _{n=0}^{\infty }n!\cdot z^{n}}are all holonomic.

Examples ofP-recursive sequences with holonomic generating functions includefn1/n + 1(2n
n
)
andfn2n/n2 + 1, where sequences such asn{\displaystyle {\sqrt {n}}} andlogn arenotP-recursive due to the nature of singularities in their corresponding generating functions. Similarly, functions with infinitely many singularities such astanz,secz, andΓ(z) arenot holonomic functions.

Software for working withP-recursive sequences and holonomic generating functions

[edit]

Tools for processing and working withP-recursive sequences inMathematica include the software packages provided for non-commercial use on theRISC Combinatorics Group algorithmic combinatorics software site. Despite being mostly closed-source, particularly powerful tools in this software suite are provided by theGuess package for guessingP-recurrences for arbitrary input sequences (useful forexperimental mathematics and exploration) and theSigma package which is able to find P-recurrences for many sums and solve for closed-form solutions toP-recurrences involving generalizedharmonic numbers.[18] Other packages listed on this particular RISC site are targeted at working with holonomicgenerating functions specifically.

Relation to discrete-time Fourier transform

[edit]
Main article:Discrete-time Fourier transform

When the seriesconverges absolutely,G(an;eiω)=n=0aneiωn{\displaystyle 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 sequencea0,a1, ....

Asymptotic growth of a sequence

[edit]

In calculus, often the growth rate of the coefficients of a power series can be used to deduce aradius 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 theasymptotic growth of the underlying sequence.

For instance, if an ordinary generating functionG(an;x) that has a finite radius of convergence ofr can be written asG(an;x)=A(x)+B(x)(1xr)βxα{\displaystyle G(a_{n};x)={\frac {A(x)+B(x)\left(1-{\frac {x}{r}}\right)^{-\beta }}{x^{\alpha }}}}

where each ofA(x) andB(x) is a function that isanalytic to a radius of convergence greater thanr (or isentire), and whereB(r) ≠ 0 thenanB(r)rαΓ(β)nβ1(1r)nB(r)rα(n+β1n)(1r)n=B(r)rα((βn))(1r)n,{\displaystyle a_{n}\sim {\frac {B(r)}{r^{\alpha }\Gamma (\beta )}}\,n^{\beta -1}\left({\frac {1}{r}}\right)^{n}\sim {\frac {B(r)}{r^{\alpha }}}{\binom {n+\beta -1}{n}}\left({\frac {1}{r}}\right)^{n}={\frac {B(r)}{r^{\alpha }}}\left(\!\!{\binom {\beta }{n}}\!\!\right)\left({\frac {1}{r}}\right)^{n}\,,}using thegamma function, abinomial coefficient, or amultiset coefficient. Note that limit asn goes to infinity of the ratio ofan to any of these expressions is guaranteed to be 1; not merely thatan is proportional to them.

Often this approach can be iterated to generate several terms in an asymptotic series foran. In particular,G(anB(r)rα(n+β1n)(1r)n;x)=G(an;x)B(r)rα(1xr)β.{\displaystyle G\left(a_{n}-{\frac {B(r)}{r^{\alpha }}}{\binom {n+\beta -1}{n}}\left({\frac {1}{r}}\right)^{n};x\right)=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 ofA,B,α,β, andr to describe the generating function, as above.

Similar asymptotic analysis is possible for exponential generating functions; with an exponential generating function, it isan/n! that grows according to these asymptotic formulae. Generally, if the generating function of one sequence minus the generating function of a second sequence has a radius of convergence that is larger than the radius of convergence of the individual generating functions then the two sequences have the same asymptotic growth.

Asymptotic growth of the sequence of squares

[edit]

As derived above, the ordinary generating function for the sequence of squares is:G(n2;x)=x(x+1)(1x)3.{\displaystyle G(n^{2};x)={\frac {x(x+1)}{(1-x)^{3}}}.}

Withr = 1,α = −1,β = 3,A(x) = 0, andB(x) =x + 1, we can verify that the squares grow as expected, like the squares:anB(r)rαΓ(β)nβ1(1r)n=1+111Γ(3)n31(11)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}\,\Gamma (3)}}\,n^{3-1}\left({\frac {1}{1}}\right)^{n}=n^{2}.}

Asymptotic growth of the Catalan numbers

[edit]
Main article:Catalan number

The ordinary generating function for theCatalan numbers isG(Cn;x)=114x2x.{\displaystyle G(C_{n};x)={\frac {1-{\sqrt {1-4x}}}{2x}}.}

Withr =1/4,α = 1,β = −1/2,A(x) =1/2, andB(x) = −1/2, we can conclude that, for the Catalan numbers:CnB(r)rαΓ(β)nβ1(1r)n=12(14)1Γ(12)n121(114)n=4nn32π.{\displaystyle C_{n}\sim {\frac {B(r)}{r^{\alpha }\Gamma (\beta )}}\,n^{\beta -1}\left({\frac {1}{r}}\right)^{n}={\frac {-{\frac {1}{2}}}{\left({\frac {1}{4}}\right)^{1}\Gamma \left(-{\frac {1}{2}}\right)}}\,n^{-{\frac {1}{2}}-1}\left({\frac {1}{\,{\frac {1}{4}}\,}}\right)^{n}={\frac {4^{n}}{n^{\frac {3}{2}}{\sqrt {\pi }}}}.}

Bivariate and multivariate generating functions

[edit]

The generating function in several variables can be generalized to arrays with multiple indices. These non-polynomial double sum examples are calledmultivariate generating functions, orsuper generating functions. For two variables, these are often calledbivariate generating functions.

Bivariate case

[edit]

The ordinary generating function of a two-dimensional arrayam,n (wheren andm are natural numbers) is:G(am,n;x,y)=m,n=0am,nxmyn.{\displaystyle G(a_{m,n};x,y)=\sum _{m,n=0}^{\infty }a_{m,n}x^{m}y^{n}.}For instance, since(1 +x)n is the ordinary generating function forbinomial coefficients for a fixedn, one may ask for a bivariate generating function that generates the binomial coefficients(n
k
)
for allk andn. To do this, consider(1 +x)n itself as a sequence inn, and find the generating function iny that has these sequence values as coefficients. Since the generating function foran is:11ay,{\displaystyle {\frac {1}{1-ay}},}the generating function for the binomial coefficients is:n,k(nk)xkyn=11(1+x)y=11yxy.{\displaystyle \sum _{n,k}{\binom {n}{k}}x^{k}y^{n}={\frac {1}{1-(1+x)y}}={\frac {1}{1-y-xy}}.}Other examples of such include the following two-variable generating functions for thebinomial coefficients, theStirling numbers, and theEulerian numbers, whereω andz denote the two variables:[19]ez+wz=m,n0(nm)wmznn!ew(ez1)=m,n0{nm}wmznn!1(1z)w=m,n0[nm]wmznn!1we(w1)zw=m,n0nmwmznn!ewezwezzew=m,n0m+n+1mwmzn(m+n+1)!.{\displaystyle {\begin{aligned}e^{z+wz}&=\sum _{m,n\geq 0}{\binom {n}{m}}w^{m}{\frac {z^{n}}{n!}}\\[4px]e^{w(e^{z}-1)}&=\sum _{m,n\geq 0}{\begin{Bmatrix}n\\m\end{Bmatrix}}w^{m}{\frac {z^{n}}{n!}}\\[4px]{\frac {1}{(1-z)^{w}}}&=\sum _{m,n\geq 0}{\begin{bmatrix}n\\m\end{bmatrix}}w^{m}{\frac {z^{n}}{n!}}\\[4px]{\frac {1-w}{e^{(w-1)z}-w}}&=\sum _{m,n\geq 0}\left\langle {\begin{matrix}n\\m\end{matrix}}\right\rangle w^{m}{\frac {z^{n}}{n!}}\\[4px]{\frac {e^{w}-e^{z}}{we^{z}-ze^{w}}}&=\sum _{m,n\geq 0}\left\langle {\begin{matrix}m+n+1\\m\end{matrix}}\right\rangle {\frac {w^{m}z^{n}}{(m+n+1)!}}.\end{aligned}}}

Multivariate case

[edit]

Multivariate generating functions arise in practice when calculating the number ofcontingency tables of non-negative integers with specified row and column totals. Suppose the table hasr rows andc columns; the row sums aret1,t2 ...tr and the column sums ares1,s2 ...sc. Then, according toI. J. Good,[20] the number of such tables is the coefficient of:x1t1xrtry1s1ycsc{\displaystyle x_{1}^{t_{1}}\cdots x_{r}^{t_{r}}y_{1}^{s_{1}}\cdots y_{c}^{s_{c}}}in:i=1rj=1c11xiyj.{\displaystyle \prod _{i=1}^{r}\prod _{j=1}^{c}{\frac {1}{1-x_{i}y_{j}}}.}

Representation by continued fractions (Jacobi-typeJ-fractions)

[edit]

Definitions

[edit]

Expansions of (formal)Jacobi-type andStieltjes-typecontinued fractions (J-fractions andS-fractions, respectively) whosehth rational convergents represent2h-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 theJacobi-type continued fractions (J-fractions) are expanded as in the following equation and have the next corresponding power series expansions with respect toz for some specific, application-dependent component sequences,{abi} and{ci}, wherez ≠ 0 denotes the formal variable in the second power series expansion given below:[21]J[](z)=11c1zab2z21c2zab3z2=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 }}}}}}\\[4px]&=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 ofzn{\displaystyle z^{n}}, denoted in shorthand byjn ≔ [zn]J[∞](z), in the previous equations correspond to matrix solutions of the equations:[k0,1k1,100k0,2k1,2k2,20k0,3k1,3k2,3k3,3]=[k0,0000k0,1k1,100k0,2k1,2k2,20][c1100ab2c2100ab3c31],{\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}},}

wherej0k0,0 = 1,jn =k0,n forn ≥ 1,kr,s = 0 ifr >s, and where for all integersp,q ≥ 0, we have anaddition formula relation given by:jp+q=k0,pk0,q+i=1min(p,q)ab2abi+1×ki,pki,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 thehth convergent functions

[edit]

Forh ≥ 0 (though in practice whenh ≥ 2), we can define the rationalhth convergents to the infiniteJ-fraction,J[∞](z), expanded by:Convh(z):=Ph(z)Qh(z)=j0+j1z++j2h1z2h1+n=2hj~h,nzn{\displaystyle \operatorname {Conv} _{h}(z):={\frac {P_{h}(z)}{Q_{h}(z)}}=j_{0}+j_{1}z+\cdots +j_{2h-1}z^{2h-1}+\sum _{n=2h}^{\infty }{\widetilde {j}}_{h,n}z^{n}}

component-wise through the sequences,Ph(z) andQh(z), defined recursively by:Ph(z)=(1chz)Ph1(z)abhz2Ph2(z)+δh,1Qh(z)=(1chz)Qh1(z)abhz2Qh2(z)+(1c1z)δ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}}}

Moreover, the rationality of the convergent functionConvh(z) for allh ≥ 2 implies additional finite difference equations and congruence properties satisfied by the sequence ofjn,and forMh ≔ ab2 ⋯ abh + 1 ifhMh then we have the congruencejn[zn]Convh(z)(modh),{\displaystyle j_{n}\equiv [z^{n}]\operatorname {Conv} _{h}(z){\pmod {h}},}

for non-symbolic, determinate choices of the parameter sequences{abi} and{ci} whenh ≥ 2, that is, when these sequences do not implicitly depend on an auxiliary parameter such asq,x, orR as in the examples contained in the table below.

Examples

[edit]

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

jn{\displaystyle j_{n}}c1{\displaystyle c_{1}}ci(i2){\displaystyle c_{i}(i\geq 2)}abi(i2){\displaystyle \mathrm {ab} _{i}(i\geq 2)}
qn2{\displaystyle q^{n^{2}}}q{\displaystyle q}q2h3(q2h+q2h21){\displaystyle q^{2h-3}\left(q^{2h}+q^{2h-2}-1\right)}q6h10(q2h21){\displaystyle q^{6h-10}\left(q^{2h-2}-1\right)}
(a;q)n{\displaystyle (a;q)_{n}}1a{\displaystyle 1-a}qh1aqh2(qh+qh11){\displaystyle q^{h-1}-aq^{h-2}\left(q^{h}+q^{h-1}-1\right)}aq2h4(aqh21)(qh11){\displaystyle aq^{2h-4}\left(aq^{h-2}-1\right)\left(q^{h-1}-1\right)}
(zqn;q)n{\displaystyle \left(zq^{-n};q\right)_{n}}qzq{\displaystyle {\frac {q-z}{q}}}qhzqz+qhzq2h1{\displaystyle {\frac {q^{h}-z-qz+q^{h}z}{q^{2h-1}}}}(qh11)(qh1z)zq4h5{\displaystyle {\frac {\left(q^{h-1}-1\right)\left(q^{h-1}-z\right)\cdot z}{q^{4h-5}}}}
(a;q)n(b;q)n{\displaystyle {\frac {(a;q)_{n}}{(b;q)_{n}}}}1a1b{\displaystyle {\frac {1-a}{1-b}}}qi2(q+abq2i3+a(1qi1qi)+b(qiq1))(1bq2i4)(1bq2i2){\displaystyle {\frac {q^{i-2}\left(q+abq^{2i-3}+a(1-q^{i-1}-q^{i})+b(q^{i}-q-1)\right)}{\left(1-bq^{2i-4}\right)\left(1-bq^{2i-2}\right)}}}q2i4(1bqi3)(1aqi2)(abqi2)(1qi1)(1bq2i5)(1bq2i4)2(1bq2i3){\displaystyle {\frac {q^{2i-4}\left(1-bq^{i-3}\right)\left(1-aq^{i-2}\right)\left(a-bq^{i-2}\right)\left(1-q^{i-1}\right)}{\left(1-bq^{2i-5}\right)\left(1-bq^{2i-4}\right)^{2}\left(1-bq^{2i-3}\right)}}}
αn(Rα)n{\displaystyle \alpha ^{n}\cdot \left({\frac {R}{\alpha }}\right)_{n}}R{\displaystyle R}R+2α(i1){\displaystyle R+2\alpha (i-1)}(i1)α(R+(i2)α){\displaystyle (i-1)\alpha {\bigl (}R+(i-2)\alpha {\bigr )}}
(1)n(xn){\displaystyle (-1)^{n}{\binom {x}{n}}}x{\displaystyle -x}(x+2(i1)2)(2i1)(2i3){\displaystyle -{\frac {(x+2(i-1)^{2})}{(2i-1)(2i-3)}}}{(xi+2)(x+i1)4(2i3)2for i3;12x(x+1)for i=2.{\displaystyle {\begin{cases}-{\dfrac {(x-i+2)(x+i-1)}{4\cdot (2i-3)^{2}}}&{\text{for }}i\geq 3;\\[4px]-{\frac {1}{2}}x(x+1)&{\text{for }}i=2.\end{cases}}}
(1)n(x+nn){\displaystyle (-1)^{n}{\binom {x+n}{n}}}(x+1){\displaystyle -(x+1)}(x2i(i2)1)(2i1)(2i3){\displaystyle {\frac {{\bigl (}x-2i(i-2)-1{\bigr )}}{(2i-1)(2i-3)}}}{(xi+2)(x+i1)4(2i3)2for i3;12x(x+1)for i=2.{\displaystyle {\begin{cases}-{\dfrac {(x-i+2)(x+i-1)}{4\cdot (2i-3)^{2}}}&{\text{for }}i\geq 3;\\[4px]-{\frac {1}{2}}x(x+1)&{\text{for }}i=2.\end{cases}}}

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

Examples

[edit]

Square numbers

[edit]

Generating functions for the sequence ofsquare numbersan =n2 are:

Generating function typeEquation
Ordinary generating functionG(n2;x)=n=0n2xn=x(x+1)(1x)3{\displaystyle G(n^{2};x)=\sum _{n=0}^{\infty }n^{2}x^{n}={\frac {x(x+1)}{(1-x)^{3}}}}
Exponential generating functionEG(n2;x)=n=0n2xnn!=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}}
Bell seriesBGp(n2;x)=n=0(pn)2xn=11p2x{\displaystyle \operatorname {BG} _{p}\left(n^{2};x\right)=\sum _{n=0}^{\infty }\left(p^{n}\right)^{2}x^{n}={\frac {1}{1-p^{2}x}}}
Dirichlet seriesDG(n2;s)=n=1n2ns=ζ(s2){\displaystyle \operatorname {DG} \left(n^{2};s\right)=\sum _{n=1}^{\infty }{\frac {n^{2}}{n^{s}}}=\zeta (s-2)}

whereζ(s) is theRiemann zeta function.

Applications

[edit]

Generating functions are used to:

  • Find aclosed formula for a sequence given in a recurrence relation, for example,Fibonacci numbers.
  • Findrecurrence 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.
  • Solveenumeration problems incombinatorics and encoding their solutions.Rook polynomials are an example of an application in combinatorics.
  • Evaluate infinite sums.

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

[edit]

Example 1: Formula for sums of harmonic numbers

[edit]

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

The simplest case occurs whensn = Σn
k = 0
ak
. We then know thatS(z) =A(z)/1 −z for the corresponding ordinary generating functions.

For example, we can manipulatesn=k=1nHk,{\displaystyle s_{n}=\sum _{k=1}^{n}H_{k}\,,}whereHk = 1 +1/2 + ⋯ +1/k are theharmonic numbers. LetH(z)=n=1Hnzn{\displaystyle H(z)=\sum _{n=1}^{\infty }{H_{n}z^{n}}}be the ordinary generating function of the harmonic numbers. ThenH(z)=11zn=1znn,{\displaystyle H(z)={\frac {1}{1-z}}\sum _{n=1}^{\infty }{\frac {z^{n}}{n}}\,,}and thusS(z)=n=1snzn=1(1z)2n=1znn.{\displaystyle S(z)=\sum _{n=1}^{\infty }{s_{n}z^{n}}={\frac {1}{(1-z)^{2}}}\sum _{n=1}^{\infty }{\frac {z^{n}}{n}}\,.}

Using1(1z)2=n=0(n+1)zn,{\displaystyle {\frac {1}{(1-z)^{2}}}=\sum _{n=0}^{\infty }(n+1)z^{n}\,,}convolution with the numerator yieldssn=k=1nn+1kk=(n+1)Hnn,{\displaystyle s_{n}=\sum _{k=1}^{n}{\frac {n+1-k}{k}}=(n+1)H_{n}-n\,,}which can also be written ask=1nHk=(n+1)(Hn+11).{\displaystyle \sum _{k=1}^{n}{H_{k}}=(n+1)(H_{n+1}-1)\,.}

Example 2: Modified binomial coefficient sums and the binomial transform

[edit]

As another example of using generating functions to relate sequences and manipulate sums, for an arbitrary sequencefn we define the two sequences of sumssn:=m=0n(nm)fm3nms~n:=m=0n(nm)(m+1)(m+2)(m+3)fm3nm,{\displaystyle {\begin{aligned}s_{n}&:=\sum _{m=0}^{n}{\binom {n}{m}}f_{m}3^{n-m}\\[4px]{\tilde {s}}_{n}&:=\sum _{m=0}^{n}{\binom {n}{m}}(m+1)(m+2)(m+3)f_{m}3^{n-m}\,,\end{aligned}}}for alln ≥ 0, and seek to express the second sums in terms of the first. We suggest an approach by generating functions.

First, we use thebinomial transform to write the generating function for the first sum asS(z)=113zF(z13z).{\displaystyle S(z)={\frac {1}{1-3z}}F\left({\frac {z}{1-3z}}\right).}

Since the generating function for the sequence⟨ (n + 1)(n + 2)(n + 3)fn is given by6F(z)+18zF(z)+9z2F(z)+z3F(z){\displaystyle 6F(z)+18zF'(z)+9z^{2}F''(z)+z^{3}F'''(z)}we may write the generating function for the second sum defined above in the formS~(z)=6(13z)F(z13z)+18z(13z)2F(z13z)+9z2(13z)3F(z13z)+z3(13z)4F(z13z).{\displaystyle {\tilde {S}}(z)={\frac {6}{(1-3z)}}F\left({\frac {z}{1-3z}}\right)+{\frac {18z}{(1-3z)^{2}}}F'\left({\frac {z}{1-3z}}\right)+{\frac {9z^{2}}{(1-3z)^{3}}}F''\left({\frac {z}{1-3z}}\right)+{\frac {z^{3}}{(1-3z)^{4}}}F'''\left({\frac {z}{1-3z}}\right).}

In particular, we may write this modified sum generating function in the form ofa(z)S(z)+b(z)zS(z)+c(z)z2S(z)+d(z)z3S(z),{\displaystyle a(z)\cdot S(z)+b(z)\cdot zS'(z)+c(z)\cdot z^{2}S''(z)+d(z)\cdot z^{3}S'''(z),}fora(z) = 6(1 − 3z)3,b(z) = 18(1 − 3z)3,c(z) = 9(1 − 3z)3, andd(z) = (1 − 3z)3, where(1 − 3z)3 = 1 − 9z + 27z2 − 27z3.

Finally, it follows that we may express the second sums through the first sums in the following form:s~n=[zn](6(13z)3n=0snzn+18(13z)3n=0nsnzn+9(13z)3n=0n(n1)snzn+(13z)3n=0n(n1)(n2)snzn)=(n+1)(n+2)(n+3)sn9n(n+1)(n+2)sn1+27(n1)n(n+1)sn2(n2)(n1)nsn3.{\displaystyle {\begin{aligned}{\tilde {s}}_{n}&=[z^{n}]\left(6(1-3z)^{3}\sum _{n=0}^{\infty }s_{n}z^{n}+18(1-3z)^{3}\sum _{n=0}^{\infty }ns_{n}z^{n}+9(1-3z)^{3}\sum _{n=0}^{\infty }n(n-1)s_{n}z^{n}+(1-3z)^{3}\sum _{n=0}^{\infty }n(n-1)(n-2)s_{n}z^{n}\right)\\[4px]&=(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

[edit]

In this example, we reformulate a generating function example given in Section 7.3 ofConcrete 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 (denotedUn) to tile a 3-by-n rectangle with unmarked 2-by-1 domino pieces. Let the auxiliary sequence,Vn, be defined as the number of ways to cover a 3-by-n rectangle-minus-corner section of the full rectangle. We seek to use these definitions to give aclosed form formula forUn 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+,V(z)=z+4z3+15z5+56z7+.{\displaystyle {\begin{aligned}U(z)=1+3z^{2}+11z^{4}+41z^{6}+\cdots ,\\V(z)=z+4z^{3}+15z^{5}+56z^{7}+\cdots .\end{aligned}}}

If we consider the possible configurations that can be given starting from the left edge of the 3-by-n rectangle, we are able to express the following mutually dependent, ormutually recursive, recurrence relations for our two sequences whenn ≥ 2 defined as above whereU0 = 1,U1 = 0,V0 = 0, andV1 = 1:Un=2Vn1+Un2Vn=Un1+Vn2.{\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 integersm ≥ 0, the index-shifted generating functions satisfy[note 1]zmG(z)=n=mgnmzn,{\displaystyle z^{m}G(z)=\sum _{n=m}^{\infty }g_{n-m}z^{n}\,,}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 byU(z)=2zV(z)+z2U(z)+1V(z)=zU(z)+z2V(z)=z1z2U(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}}}which then implies by solving the system of equations (and this is the particular trick to our method here) thatU(z)=1z214z2+z4=13311(2+3)z2+13+311(23)z2.{\displaystyle U(z)={\frac {1-z^{2}}{1-4z^{2}+z^{4}}}={\frac {1}{3-{\sqrt {3}}}}\cdot {\frac {1}{1-\left(2+{\sqrt {3}}\right)z^{2}}}+{\frac {1}{3+{\sqrt {3}}}}\cdot {\frac {1}{1-\left(2-{\sqrt {3}}\right)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 thatU2n + 1 ≡ 0 and thatU2n=(2+3)n33,{\displaystyle U_{2n}=\left\lceil {\frac {\left(2+{\sqrt {3}}\right)^{n}}{3-{\sqrt {3}}}}\right\rceil \,,}for all integersn ≥ 0. We also note that the same shifted generating function technique applied to the second-orderrecurrence for theFibonacci 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 onrational functions given above.

Convolution (Cauchy products)

[edit]

A discreteconvolution 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 (seeCauchy product).

  1. ConsiderA(z) andB(z) are ordinary generating functions.C(z)=A(z)B(z)[zn]C(z)=k=0nakbnk{\displaystyle C(z)=A(z)B(z)\Leftrightarrow [z^{n}]C(z)=\sum _{k=0}^{n}{a_{k}b_{n-k}}}
  2. ConsiderA(z) andB(z) are exponential generating functions.C(z)=A(z)B(z)[znn!]C(z)=k=0n(nk)akbnk{\displaystyle C(z)=A(z)B(z)\Leftrightarrow \left[{\frac {z^{n}}{n!}}\right]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 functionsC(z)=F(z)G(z)H(z)[zn]C(z)=j+k+l=nfjgkhl{\displaystyle C(z)=F(z)G(z)H(z)\Leftrightarrow [z^{n}]C(z)=\sum _{j+k+l=n}f_{j}g_{k}h_{l}}
  4. Consider them-fold convolution of a sequence with itself for some positive integerm ≥ 1 (see the example below for an application)C(z)=G(z)m[zn]C(z)=k1+k2++km=ngk1gk2gkm{\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 theprobability generating function, orpgf, of a random variableZ is denoted byGZ(z), then we can show that for any two random variables[23]GX+Y(z)=GX(z)GY(z),{\displaystyle G_{X+Y}(z)=G_{X}(z)G_{Y}(z)\,,}ifX andY are independent.

Example: The money-changing problem

[edit]

The number of ways to payn ≥ 0 cents in coin denominations of values in the set {1, 5, 10, 25, 50} (i.e., in pennies, nickels, dimes, quarters, and half dollars, respectively), where we distinguish instances based upon the total number of each coin but not upon the order in which the coins are presented, is given by the ordinary generating function11z11z511z1011z2511z50.{\displaystyle {\frac {1}{1-z}}{\frac {1}{1-z^{5}}}{\frac {1}{1-z^{10}}}{\frac {1}{1-z^{25}}}{\frac {1}{1-z^{50}}}\,.}When we also distinguish based upon the order in which the coins are presented (e.g., one penny then one nickel is distinct from one nickel then one penny), the ordinary generating function is11zz5z10z25z50.{\displaystyle {\frac {1}{1-z-z^{5}-z^{10}-z^{25}-z^{50}}}\,.}

If we allow then cents to be paid in coins ofany positive integer denomination, we arrive at thepartition function ordinary generating function expanded by an infiniteq-Pochhammer symbol product,n=1(1zn)1.{\displaystyle \prod _{n=1}^{\infty }\left(1-z^{n}\right)^{-1}\,.}When the order of the coins matters, the ordinary generating function is11n=1zn=1z12z.{\displaystyle {\frac {1}{1-\sum _{n=1}^{\infty }z^{n}}}={\frac {1-z}{1-2z}}\,.}

Example: Generating function for the Catalan numbers

[edit]

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 theCatalan numbers,Cn. In particular, this sequence has the combinatorial interpretation as being the number of ways to insert parentheses into the productx0 ·x1 ·⋯·xn so that the order of multiplication is completely specified. For example,C2 = 2 which corresponds to the two expressionsx0 · (x1 ·x2) and(x0 ·x1) ·x2. It follows that the sequence satisfies a recurrence relation given byCn=k=0n1CkCn1k+δn,0=C0Cn1+C1Cn2++Cn1C0+δn,0,n0,{\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}\,,\quad n\geq 0\,,}and so has a corresponding convolved generating function,C(z), satisfyingC(z)=zC(z)2+1.{\displaystyle C(z)=z\cdot C(z)^{2}+1\,.}

SinceC(0) = 1 ≠ ∞, we then arrive at a formula for this generating function given byC(z)=114z2z=n=01n+1(2nn)zn.{\displaystyle C(z)={\frac {1-{\sqrt {1-4z}}}{2z}}=\sum _{n=0}^{\infty }{\frac {1}{n+1}}{\binom {2n}{n}}z^{n}\,.}

Note that the first equation implicitly definingC(z) above implies thatC(z)=11zC(z),{\displaystyle C(z)={\frac {1}{1-z\cdot C(z)}}\,,}which then leads to another "simple" (of form) continued fraction expansion of this generating function.

Example: Spanning trees of fans and convolutions of convolutions

[edit]

Afan of ordern is defined to be a graph on the vertices{0, 1, ...,n} with2n − 1 edges connected according to the following rules: Vertex 0 is connected by a single edge to each of the othern vertices, and vertexk{\displaystyle k} is connected by a single edge to the next vertexk + 1 for all1 ≤k <n.[24] There is one fan of order one, three fans of order two, eight fans of order three, and so on. Aspanning 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 treesfn of a fan of ordern are possible for eachn ≥ 1.

As an observation, we may approach the question by counting the number of ways to join adjacent sets of vertices. For example, whenn = 4, we have thatf4 = 4 + 3 · 1 + 2 · 2 + 1 · 3 + 2 · 1 · 1 + 1 · 2 · 1 + 1 · 1 · 2 + 1 · 1 · 1 · 1 = 21, which is a sum over them-fold convolutions of the sequencegn =n = [zn]z/(1 −z)2 form ≔ 1, 2, 3, 4. More generally, we may write a formula for this sequence asfn=m>0k1+k2++km=nk1,k2,,km>0gk1gk2gkm,{\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 asF(z)=G(z)+G(z)2+G(z)3+=G(z)1G(z)=z(1z)2z=z13z+z2,{\displaystyle 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}}}\,,}from which we are able to extract an exact formula for the sequence by taking thepartial fraction expansion of the last generating function.

Implicit generating functions and the Lagrange inversion formula

[edit]
[icon]
This sectionneeds expansion with: This section needs to be added to the list of techniques with generating functions. You can help byadding to it.(April 2017)

One often encounters generating functions specified by a functional equation, instead of an explicit specification. For example, the generating functionT(z) for the number of binary trees onn nodes (leaves included) satisfies

T(z)=z(1+T(z)2){\displaystyle T(z)=z\left(1+T(z)^{2}\right)}

TheLagrange inversion theorem is a tool used to explicitly evaluate solutions to such equations.

Lagrange inversion formulaLetϕ(z)C[[z]]{\textstyle \phi (z)\in C[[z]]} be a formal power series with a non-zero constant term. Then the functional equationT(z)=zϕ(T(z)){\displaystyle T(z)=z\phi (T(z))}admits a unique solution inT(z)C[[z]]{\textstyle T(z)\in C[[z]]}, which satisfies

[zn]T(z)=[zn1]1n(ϕ(z))n{\displaystyle [z^{n}]T(z)=[z^{n-1}]{\frac {1}{n}}(\phi (z))^{n}}

where the notation[zn]F(z){\displaystyle [z^{n}]F(z)} returns the coefficient ofzn{\displaystyle z^{n}} inF(z){\displaystyle F(z)}.

Applying the above theorem to our functional equation yields (withϕ(z)=1+z2{\textstyle \phi (z)=1+z^{2}}):

[zn]T(z)=[zn1]1n(1+z2)n{\displaystyle [z^{n}]T(z)=[z^{n-1}]{\frac {1}{n}}(1+z^{2})^{n}}

Via the binomial theorem expansion, for evenn{\displaystyle n}, the formula returns0{\displaystyle 0}. This is expected as one can prove that the number of leaves of a binary tree are one more than the number of its internal nodes, so the total sum should always be an odd number. For oddn{\displaystyle n}, however, we get

[zn1]1n(1+z2)n=1n(nn+12){\displaystyle [z^{n-1}]{\frac {1}{n}}(1+z^{2})^{n}={\frac {1}{n}}{\dbinom {n}{\frac {n+1}{2}}}}

The expression becomes much neater if we letn{\displaystyle n} be the number of internal nodes: Now the expression just becomes then{\displaystyle n}th Catalan number.

Introducing a free parameter (snake oil method)

[edit]

Sometimes the sumsn 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 haven as limit in the summation. When n does not appear explicitly in the summation, we may considern as a "free" parameter and treatsn as a coefficient ofF(z) = Σsnzn, change the order of the summations onn andk, and try to compute the inner sum.

For example, if we want to computesn=k=0(n+km+2k)(2kk)(1)kk+1,m,nN0,{\displaystyle s_{n}=\sum _{k=0}^{\infty }{{\binom {n+k}{m+2k}}{\binom {2k}{k}}{\frac {(-1)^{k}}{k+1}}}\,,\quad m,n\in \mathbb {N} _{0}\,,}we can treatn as a "free" parameter, and setF(z)=n=0(k=0(n+km+2k)(2kk)(1)kk+1)zn.{\displaystyle F(z)=\sum _{n=0}^{\infty }{\left(\sum _{k=0}^{\infty }{{\binom {n+k}{m+2k}}{\binom {2k}{k}}{\frac {(-1)^{k}}{k+1}}}\right)}z^{n}\,.}

Interchanging summation ("snake oil") givesF(z)=k=0(2kk)(1)kk+1zkn=0(n+km+2k)zn+k.{\displaystyle F(z)=\sum _{k=0}^{\infty }{{\binom {2k}{k}}{\frac {(-1)^{k}}{k+1}}z^{-k}}\sum _{n=0}^{\infty }{{\binom {n+k}{m+2k}}z^{n+k}}\,.}

Now the inner sum iszm + 2k/(1 −z)m + 2k + 1. ThusF(z)=zm(1z)m+1k=01k+1(2kk)(z(1z)2)k=zm(1z)m+1k=0Ck(z(1z)2)kwhere Ck=kth Catalan number=zm(1z)m+111+4z(1z)22z(1z)2=zm12(1z)m1(11+z1z)=zm(1z)m=zzm1(1z)m.{\displaystyle {\begin{aligned}F(z)&={\frac {z^{m}}{(1-z)^{m+1}}}\sum _{k=0}^{\infty }{{\frac {1}{k+1}}{\binom {2k}{k}}\left({\frac {-z}{(1-z)^{2}}}\right)^{k}}\\[4px]&={\frac {z^{m}}{(1-z)^{m+1}}}\sum _{k=0}^{\infty }{C_{k}\left({\frac {-z}{(1-z)^{2}}}\right)^{k}}&{\text{where }}C_{k}=k{\text{th Catalan number}}\\[4px]&={\frac {z^{m}}{(1-z)^{m+1}}}{\frac {1-{\sqrt {1+{\frac {4z}{(1-z)^{2}}}}}}{\frac {-2z}{(1-z)^{2}}}}\\[4px]&={\frac {-z^{m-1}}{2(1-z)^{m-1}}}\left(1-{\frac {1+z}{1-z}}\right)\\[4px]&={\frac {z^{m}}{(1-z)^{m}}}=z{\frac {z^{m-1}}{(1-z)^{m}}}\,.\end{aligned}}}

Then we obtainsn={(n1m1)for m1,[n=0]for m=0.{\displaystyle s_{n}={\begin{cases}\displaystyle {\binom {n-1}{m-1}}&{\text{for }}m\geq 1\,,\\{}[n=0]&{\text{for }}m=0\,.\end{cases}}}

It is instructive to use the same method again for the sum, but this time takem as the free parameter instead ofn. We thus setG(z)=m=0(k=0(n+km+2k)(2kk)(1)kk+1)zm.{\displaystyle G(z)=\sum _{m=0}^{\infty }\left(\sum _{k=0}^{\infty }{\binom {n+k}{m+2k}}{\binom {2k}{k}}{\frac {(-1)^{k}}{k+1}}\right)z^{m}\,.}

Interchanging summation ("snake oil") givesG(z)=k=0(2kk)(1)kk+1z2km=0(n+km+2k)zm+2k.{\displaystyle G(z)=\sum _{k=0}^{\infty }{\binom {2k}{k}}{\frac {(-1)^{k}}{k+1}}z^{-2k}\sum _{m=0}^{\infty }{\binom {n+k}{m+2k}}z^{m+2k}\,.}

Now the inner sum is(1 +z)n +k. ThusG(z)=(1+z)nk=01k+1(2kk)((1+z)z2)k=(1+z)nk=0Ck((1+z)z2)kwhere Ck=kth Catalan number=(1+z)n11+4(1+z)z22(1+z)z2=(1+z)nz2zz2+4+4z2(1+z)=(1+z)nz2z(z+2)2(1+z)=(1+z)n2z2(1+z)=z(1+z)n1.{\displaystyle {\begin{aligned}G(z)&=(1+z)^{n}\sum _{k=0}^{\infty }{\frac {1}{k+1}}{\binom {2k}{k}}\left({\frac {-(1+z)}{z^{2}}}\right)^{k}\\[4px]&=(1+z)^{n}\sum _{k=0}^{\infty }C_{k}\,\left({\frac {-(1+z)}{z^{2}}}\right)^{k}&{\text{where }}C_{k}=k{\text{th Catalan number}}\\[4px]&=(1+z)^{n}\,{\frac {1-{\sqrt {1+{\frac {4(1+z)}{z^{2}}}}}}{\frac {-2(1+z)}{z^{2}}}}\\[4px]&=(1+z)^{n}\,{\frac {z^{2}-z{\sqrt {z^{2}+4+4z}}}{-2(1+z)}}\\[4px]&=(1+z)^{n}\,{\frac {z^{2}-z(z+2)}{-2(1+z)}}\\[4px]&=(1+z)^{n}\,{\frac {-2z}{-2(1+z)}}=z(1+z)^{n-1}\,.\end{aligned}}}

Thus we obtainsn=[zm]z(1+z)n1=[zm1](1+z)n1=(n1m1),{\displaystyle s_{n}=\left[z^{m}\right]z(1+z)^{n-1}=\left[z^{m-1}\right](1+z)^{n-1}={\binom {n-1}{m-1}}\,,}form ≥ 1 as before.

Generating functions prove congruences

[edit]

We say that two generating functions (power series) are congruent modulom, writtenA(z) ≡B(z) (modm) if their coefficients are congruent modulom for alln ≥ 0, i.e.,anbn (modm) for all relevant cases of the integersn (note that we need not assume thatm is an integer here—it may very well be polynomial-valued in some indeterminatex, for example). If the "simpler" right-hand-side generating function,B(z), is a rational function ofz, then the form of this sequence suggests that the sequence iseventually periodic modulo fixed particular cases of integer-valuedm ≥ 2. For example, we can prove that theEuler 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}}\,,}satisfy the following congruence modulo 3:[25]n=0Enzn=1z21+z2(mod3).{\displaystyle \sum _{n=0}^{\infty }E_{n}z^{n}={\frac {1-z^{2}}{1+z^{2}}}{\pmod {3}}\,.}

One useful method of obtaining congruences for sequences enumerated by special generating functions modulo any integers (i.e., not only prime powerspk) is given in the section on continued fraction representations of (even non-convergent) ordinary generating functions byJ-fractions above. We cite one particular result related to generating series expanded through a representation by continued fraction from Lando'sLectures on Generating Functions as follows:

Theorem: congruences for series generated by expansions of continued fractionsSuppose that the generating functionA(z) is represented by an infinitecontinued fraction of the formA(z)=11c1zp1z21c2zp2z21c3z{\displaystyle A(z)={\cfrac {1}{1-c_{1}z-{\cfrac {p_{1}z^{2}}{1-c_{2}z-{\cfrac {p_{2}z^{2}}{1-c_{3}z-{\ddots }}}}}}}}and thatAp(z) denotes thepth convergent to this continued fraction expansion defined such thatan = [zn]Ap(z) for all0 ≤n < 2p. Then:

  1. the functionAp(z) is rational for allp ≥ 2 where we assume that one of divisibility criteria ofp |p1,p1p2,p1p2p3 is met, that is,p |p1p2pk for somek ≥ 1; and
  2. if the integerp divides the productp1p2pk, then we haveA(z) ≡Ak(z) (modp).

Generating functions also have other uses in proving congruences for their coefficients. We cite the next two specific examples deriving special case congruences for theStirling numbers of the first kind and for thepartition functionp(n) which show the versatility of generating functions in tackling problems involvinginteger sequences.

The Stirling numbers modulo small integers

[edit]

Themain article on the Stirling numbers generated by the finite productsSn(x):=k=0n[nk]xk=x(x+1)(x+2)(x+n1),n1,{\displaystyle S_{n}(x):=\sum _{k=0}^{n}{\begin{bmatrix}n\\k\end{bmatrix}}x^{k}=x(x+1)(x+2)\cdots (x+n-1)\,,\quad n\geq 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 referenceGeneratingfunctionology.We repeat the basic argument and notice that when reduces modulo 2, these finite product generating functions each satisfy

Sn(x)=[x(x+1)][x(x+1)]=xn2(x+1)n2,{\displaystyle S_{n}(x)=[x(x+1)]\cdot [x(x+1)]\cdots =x^{\left\lceil {\frac {n}{2}}\right\rceil }(x+1)^{\left\lfloor {\frac {n}{2}}\right\rfloor }\,,}

which implies that the parity of theseStirling numbers matches that of the binomial coefficient

[nk](n2kn2)(mod2),{\displaystyle {\begin{bmatrix}n\\k\end{bmatrix}}\equiv {\binom {\left\lfloor {\frac {n}{2}}\right\rfloor }{k-\left\lceil {\frac {n}{2}}\right\rceil }}{\pmod {2}}\,,}

and consequently shows that[n
k
]
is even wheneverk < ⌊n/2.

Similarly, we can reduce the right-hand-side products defining the Stirling number generating functions modulo 3 to obtain slightly more complicated expressions providing that[nm][xm](xn3(x+1)n13(x+2)n3)(mod3)k=0m(n13k)(n3mkn3)×2n3+n3(mk)(mod3).{\displaystyle {\begin{aligned}{\begin{bmatrix}n\\m\end{bmatrix}}&\equiv [x^{m}]\left(x^{\left\lceil {\frac {n}{3}}\right\rceil }(x+1)^{\left\lceil {\frac {n-1}{3}}\right\rceil }(x+2)^{\left\lfloor {\frac {n}{3}}\right\rfloor }\right)&&{\pmod {3}}\\&\equiv \sum _{k=0}^{m}{\begin{pmatrix}\left\lceil {\frac {n-1}{3}}\right\rceil \\k\end{pmatrix}}{\begin{pmatrix}\left\lfloor {\frac {n}{3}}\right\rfloor \\m-k-\left\lceil {\frac {n}{3}}\right\rceil \end{pmatrix}}\times 2^{\left\lceil {\frac {n}{3}}\right\rceil +\left\lfloor {\frac {n}{3}}\right\rfloor -(m-k)}&&{\pmod {3}}\,.\end{aligned}}}

Congruences for the partition function

[edit]

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 thatthepartition functionp(n) is generated by the reciprocal infiniteq-Pochhammer symbol product (orz-Pochhammer product as the case may be) given byn=0p(n)zn=1(1z)(1z2)(1z3)=1+z+2z2+3z3+5z4+7z5+11z6+.{\displaystyle {\begin{aligned}\sum _{n=0}^{\infty }p(n)z^{n}&={\frac {1}{\left(1-z\right)\left(1-z^{2}\right)\left(1-z^{3}\right)\cdots }}\\[4pt]&=1+z+2z^{2}+3z^{3}+5z^{4}+7z^{5}+11z^{6}+\cdots .\end{aligned}}}

This partition function satisfies many knowncongruence properties, which notably include the following results though there are still many open questions about the forms of related integer congruences for the function:[26]p(5m+4)0(mod5)p(7m+5)0(mod7)p(11m+6)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+6)&\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 in the binomial coefficient generating function1(1z)5=i=0(4+i4)zi,{\displaystyle {\frac {1}{(1-z)^{5}}}=\sum _{i=0}^{\infty }{\binom {4+i}{4}}z^{i}\,,}all of the coefficients are divisible by 5 except for those which correspond to the powers1,z5,z10, ... and moreover in those cases the remainder of the coefficient is 1 modulo 5. Thus,1(1z)511z5(mod5),{\displaystyle {\frac {1}{(1-z)^{5}}}\equiv {\frac {1}{1-z^{5}}}{\pmod {5}}\,,} or equivalently1z5(1z)51(mod5).{\displaystyle {\frac {1-z^{5}}{(1-z)^{5}}}\equiv 1{\pmod {5}}\,.}It follows that(1z5)(1z10)(1z15)((1z)(1z2)(1z3))51(mod5).{\displaystyle {\frac {\left(1-z^{5}\right)\left(1-z^{10}\right)\left(1-z^{15}\right)\cdots }{\left((1-z)\left(1-z^{2}\right)\left(1-z^{3}\right)\cdots \right)^{5}}}\equiv 1{\pmod {5}}\,.}

Using the infinite product expansions ofz(1z5)(1z10)(1z)(1z2)=z((1z)(1z2))4×(1z5)(1z10)((1z)(1z2))5,{\displaystyle z\cdot {\frac {\left(1-z^{5}\right)\left(1-z^{10}\right)\cdots }{\left(1-z\right)\left(1-z^{2}\right)\cdots }}=z\cdot \left((1-z)\left(1-z^{2}\right)\cdots \right)^{4}\times {\frac {\left(1-z^{5}\right)\left(1-z^{10}\right)\cdots }{\left(\left(1-z\right)\left(1-z^{2}\right)\cdots \right)^{5}}}\,,}it can be shown that the coefficient ofz5m + 5 inz · ((1 −z)(1 −z2)⋯)4 is divisible by 5 for allm.[27] Finally, sincen=1p(n1)zn=z(1z)(1z2)=z(1z5)(1z10)(1z)(1z2)×(1+z5+z10+)(1+z10+z20+){\displaystyle {\begin{aligned}\sum _{n=1}^{\infty }p(n-1)z^{n}&={\frac {z}{(1-z)\left(1-z^{2}\right)\cdots }}\\[6px]&=z\cdot {\frac {\left(1-z^{5}\right)\left(1-z^{10}\right)\cdots }{(1-z)\left(1-z^{2}\right)\cdots }}\times \left(1+z^{5}+z^{10}+\cdots \right)\left(1+z^{10}+z^{20}+\cdots \right)\cdots \end{aligned}}}we may equate the coefficients ofz5m + 5 in the previous equations to prove our desired congruence result, namely thatp(5m + 4) ≡ 0 (mod 5) for allm ≥ 0.

Transformations of generating functions

[edit]

There are a number of transformations of generating functions that provide other applications (see themain article). A transformation of a sequence'sordinary 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 (seeintegral transformations) or weighted sums over the higher-order derivatives of these functions (seederivative transformations).

Generating function transformations can come into play when we seek to express a generating function for the sumssn:=m=0n(nm)Cn,mam,{\displaystyle s_{n}:=\sum _{m=0}^{n}{\binom {n}{m}}C_{n,m}a_{m},}

in the form ofS(z) =g(z)A(f(z)) involving the original sequence generating function. For example, if the sums aresn:=k=0(n+km+2k)ak{\displaystyle s_{n}:=\sum _{k=0}^{\infty }{\binom {n+k}{m+2k}}a_{k}\,}then the generating function for the modified sum expressions is given by[28]S(z)=zm(1z)m+1A(z(1z)2){\displaystyle S(z)={\frac {z^{m}}{(1-z)^{m+1}}}A\left({\frac {z}{(1-z)^{2}}}\right)}(see also thebinomial transform and theStirling transform).

There are also integral formulas for converting between a sequence's OGF,F(z), and its exponential generating function, or EGF,(z), and vice versa given byF(z)=0F^(tz)etdt,F^(z)=12πππF(zeiϑ)eeiϑdϑ,{\displaystyle {\begin{aligned}F(z)&=\int _{0}^{\infty }{\hat {F}}(tz)e^{-t}\,dt\,,\\[4px]{\hat {F}}(z)&={\frac {1}{2\pi }}\int _{-\pi }^{\pi }F\left(ze^{-i\vartheta }\right)e^{e^{i\vartheta }}\,d\vartheta \,,\end{aligned}}}

provided that these integrals converge for appropriate values ofz.

Tables of special generating functions

[edit]

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

[icon]
This sectionneeds expansion with: Lists of special and special sequence generating functions. The next table is a start. You can help byadding to it.(April 2017)
Formal power seriesGenerating-function formulaNotes
n=0(m+nn)(Hn+mHm)zn{\displaystyle \sum _{n=0}^{\infty }{\binom {m+n}{n}}\left(H_{n+m}-H_{m}\right)z^{n}}1(1z)m+1ln11z{\displaystyle {\frac {1}{(1-z)^{m+1}}}\ln {\frac {1}{1-z}}}Hn{\displaystyle H_{n}} is a first-orderharmonic number
n=0Bnznn!{\displaystyle \sum _{n=0}^{\infty }B_{n}{\frac {z^{n}}{n!}}}zez1{\displaystyle {\frac {z}{e^{z}-1}}}Bn{\displaystyle B_{n}} is aBernoulli number
n=0Fmnzn{\displaystyle \sum _{n=0}^{\infty }F_{mn}z^{n}}Fmz1(Fm1+Fm+1)z+(1)mz2{\displaystyle {\frac {F_{m}z}{1-(F_{m-1}+F_{m+1})z+(-1)^{m}z^{2}}}}Fn{\displaystyle F_{n}} is aFibonacci number andmZ+{\displaystyle m\in \mathbb {Z} ^{+}}
n=0{nm}zn{\displaystyle \sum _{n=0}^{\infty }\left\{{\begin{matrix}n\\m\end{matrix}}\right\}z^{n}}(z1)m¯=zm(1z)(12z)(1mz){\displaystyle (z^{-1})^{\overline {-m}}={\frac {z^{m}}{(1-z)(1-2z)\cdots (1-mz)}}}xn¯{\displaystyle x^{\overline {n}}} denotes therising factorial, orPochhammer symbol and some integerm0{\displaystyle m\geq 0}
n=0[nm]zn{\displaystyle \sum _{n=0}^{\infty }\left[{\begin{matrix}n\\m\end{matrix}}\right]z^{n}}zm¯=z(z+1)(z+m1){\displaystyle z^{\overline {m}}=z(z+1)\cdots (z+m-1)}
n=1(1)n14n(4n2)B2nz2n(2n)(2n)!{\displaystyle \sum _{n=1}^{\infty }{\frac {(-1)^{n-1}4^{n}(4^{n}-2)B_{2n}z^{2n}}{(2n)\cdot (2n)!}}}lntan(z)z{\displaystyle \ln {\frac {\tan(z)}{z}}}
n=0(1/2)n¯z2n(2n+1)n!{\displaystyle \sum _{n=0}^{\infty }{\frac {(1/2)^{\overline {n}}z^{2n}}{(2n+1)\cdot n!}}}z1arcsin(z){\displaystyle z^{-1}\arcsin(z)}
n=0Hn(s)zn{\displaystyle \sum _{n=0}^{\infty }H_{n}^{(s)}z^{n}}Lis(z)1z{\displaystyle {\frac {\operatorname {Li} _{s}(z)}{1-z}}}Lis(z){\displaystyle \operatorname {Li} _{s}(z)} is thepolylogarithm function andHn(s){\displaystyle H_{n}^{(s)}} is a generalizedharmonic number for(s)>1{\displaystyle \Re (s)>1}
n=0nmzn{\displaystyle \sum _{n=0}^{\infty }n^{m}z^{n}}0jm{mj}j!zj(1z)j+1{\displaystyle \sum _{0\leq j\leq m}\left\{{\begin{matrix}m\\j\end{matrix}}\right\}{\frac {j!\cdot z^{j}}{(1-z)^{j+1}}}}{nm}{\displaystyle \left\{{\begin{matrix}n\\m\end{matrix}}\right\}} is aStirling number of the second kind and where the individual terms in the expansion satisfyzi(1z)i+1=k=0i(ik)(1)ki(1z)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(nkk)nnkzk{\displaystyle \sum _{k<n}{\binom {n-k}{k}}{\frac {n}{n-k}}z^{k}}(1+1+4z2)n+(11+4z2)n{\displaystyle \left({\frac {1+{\sqrt {1+4z}}}{2}}\right)^{n}+\left({\frac {1-{\sqrt {1+4z}}}{2}}\right)^{n}}
n1,,nm0min(n1,,nm)z1n1zmnm{\displaystyle \sum _{n_{1},\ldots ,n_{m}\geq 0}\min(n_{1},\ldots ,n_{m})z_{1}^{n_{1}}\cdots z_{m}^{n_{m}}}z1zm(1z1)(1zm)(1z1zm){\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 byM(w,z):=m,n0min(m,n)wmzn=wz(1w)(1z)(1wz){\displaystyle M(w,z):=\sum _{m,n\geq 0}\min(m,n)w^{m}z^{n}={\frac {wz}{(1-w)(1-z)(1-wz)}}}
n=0(sn)zn{\displaystyle \sum _{n=0}^{\infty }{\binom {s}{n}}z^{n}}(1+z)s{\displaystyle (1+z)^{s}}sC{\displaystyle s\in \mathbb {C} }
n=0(nk)zn{\displaystyle \sum _{n=0}^{\infty }{\binom {n}{k}}z^{n}}zk(1z)k+1{\displaystyle {\frac {z^{k}}{(1-z)^{k+1}}}}kN{\displaystyle k\in \mathbb {N} }
n=1log(n)zn{\displaystyle \sum _{n=1}^{\infty }\log {(n)}z^{n}}sLis(z)|s=0{\displaystyle \left.-{\frac {\partial }{\partial s}}\operatorname {{Li}_{s}(z)} \right|_{s=0}}

See also

[edit]

Notes

[edit]
  1. ^Incidentally, we also have a corresponding formula whenm < 0 given byn=0gn+mzn=G(z)g0g1zgm1zm1zm.{\displaystyle \sum _{n=0}^{\infty }g_{n+m}z^{n}={\frac {G(z)-g_{0}-g_{1}z-\cdots -g_{m-1}z^{m-1}}{z^{m}}}\,.}

References

[edit]
  1. ^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.
  2. ^Knuth, Donald E. (1997). "§1.2.9 Generating Functions".Fundamental Algorithms.The Art of Computer Programming. Vol. 1 (3rd ed.). Addison-Wesley.ISBN 0-201-89683-4.
  3. ^Flajolet & Sedgewick 2009, p. 95
  4. ^"Lambert series identity".Math Overflow. 2017.
  5. ^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
  6. ^Wilf 1994, p. 56
  7. ^Wilf 1994, p. 59
  8. ^Hardy, G.H.; Wright, E.M.; Heath-Brown, D.R; Silverman, J.H. (2008).An Introduction to the Theory of Numbers (6th ed.). Oxford University Press. p. 339.ISBN 9780199219858.
  9. ^Knuth, D. E. (1992). "Convolution Polynomials".Mathematica J.2:67–78.arXiv:math/9207221.Bibcode:1992math......7221K.
  10. ^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.
  11. ^Mathar, R. J. (2012). "Yet another table of integrals".arXiv:1207.5845 [math.CA]. v4 eq. (0.4)
  12. ^Graham, Knuth & Patashnik 1994, Table 265 in §6.1 for finite sum identities involving the Stirling number triangles.
  13. ^Lando 2003, §2.4
  14. ^Example fromStanley, Richard P.; Fomin, Sergey (1997). "§6.3".Enumerative Combinatorics: Volume 2. Cambridge Studies in Advanced Mathematics. Vol. 62. Cambridge University Press.ISBN 978-0-521-78987-5.
  15. ^Knuth 1997, §1.2.9
  16. ^Solution toGraham, Knuth & Patashnik 1994, p. 569, exercise 7.36
  17. ^Flajolet & Sedgewick 2009, §B.4
  18. ^Schneider, C. (2007)."Symbolic Summation Assists Combinatorics".Sém. Lothar. Combin.56:1–36.
  19. ^See the usage of these terms inGraham, Knuth & Patashnik 1994, §7.4 on special sequence generating functions.
  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. ^For more complete information on the properties ofJ-fractions see:
  22. ^See the following articles:
  23. ^Graham, Knuth & Patashnik 1994, §8.3
  24. ^Graham, Knuth & Patashnik 1994, Example 6 in §7.3 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.
  25. ^Lando 2003, §5
  26. ^Hardy et al. 2008, §19.12
  27. ^Hardy, G.H.; Wright, E.M.An Introduction to the Theory of Numbers. p.288, Th.361
  28. ^Graham, Knuth & Patashnik 1994, p. 535, exercise 5.71
  29. ^See also the1031 Generating Functions found inPlouffe, Simon (1992).Approximations de séries génératrices et quelques conjectures [Approximations of generating functions and a few conjectures] (Masters) (in French). Université du Québec à Montréal.arXiv:0911.4975.

Citations

[edit]

External links

[edit]
Authority control databases: NationalEdit this at Wikidata
Retrieved from "https://en.wikipedia.org/w/index.php?title=Generating_function&oldid=1281625985"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp