mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and their changes (cal ...
, a generating function is a way of encoding an
infinite sequence In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and t ...
of numbers (''a''''n'') by treating them as the
coefficient In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...
s of a
formal power series In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained (), and quantities and their changes ( and ). There is no gener ...
. This series is called the generating function of the sequence. Unlike an ordinary series, the ''formal'' power series is not required to
converge Converge may refer to: * Converge (band), American hardcore punk band * Converge (Baptist denomination), American national evangelical Baptist body * Limit (mathematics) * Converge ICT, internet service provider in the Philippines See also

: in fact, the generating function is not actually regarded as a
function Function or functionality may refer to: Computing * Function key A function key is a key on a computer A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically. Modern comp ...
, and the "variable" remains an indeterminate. Generating functions were first introduced by
Abraham de Moivre Abraham de Moivre (; 26 May 166727 November 1754) was a French mathematician known for de Moivre's formula In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematica ...

Abraham de Moivre
in 1730, in order to solve the general linear recurrence problem. One can generalize to formal power series in more than one indeterminate, to encode information about infinite multi-dimensional arrays of 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 In mathematics, a series expansion is an expansion of a Function (mathematics), function into a Series (mathematics), series, or infinite sum. It is a method for calculating a Function (mathematics), function that cannot be expressed by just eleme ...
; 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 In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and t ...
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 Domain may refer to: Mathematics *Domain of a function In mathematics, the domain of a Function (mathematics), function is the Set (mathematics), set of inputs accepted by the function. It is sometimes denoted by \operatorname(f), where is th ...
to a
codomain In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...

. Generating functions are sometimes called generating series, in that a series of terms can be said to be the generator of its sequence of term coefficients.


: ''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 George Pólya (; hu, Pólya György ) (December 13, 1887 – September 7, 1985) was a Hungarian mathematician A mathematician is someone who uses an extensive knowledge of mathematics Mathematics (from Ancient Greek, Greek: ) includes t ...
, '' Mathematics and plausible reasoning'' (1954) :''A generating function is a clothesline on which we hang up a sequence of numbers for display.'' :—
Herbert Wilf Herbert Saul Wilf (June 13, 1931 – January 7, 2012) was a mathematician, specializing in combinatorics and graph theory. He was the Thomas A. Scott Professorship of Mathematics, Thomas A. Scott Professor of Mathematics in Combinatorial Analysi ...

Herbert Wilf
' (1994)

Ordinary generating function (OGF)

The ''ordinary generating function'' of a sequence ''a''''n'' is :G(a_n;x)=\sum_^\infty a_nx^n. When the term ''generating function'' is used without qualification, it is usually taken to mean an ordinary generating function. If ''a''''n'' is the
probability mass function In probability Probability is the branch of mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which th ...
of a
discrete random variable A random variable is a Dependent and independent variables, variable whose values depend on Outcome (probability), outcomes of a Randomness, random event. Also called random quantity, aleatory variable, or stochastic variable. It is formally defi ...
, then its ordinary generating function is called a
probability-generating function In probability theory Probability theory is the branch of mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in w ...
. The ordinary generating function can be generalized to arrays with multiple indices. For example, the ordinary generating function of a two-dimensional array ''a''''m, n'' (where ''n'' and ''m'' are natural numbers) is :G(a_;x,y)=\sum_^\infty a_x^my^n.

Exponential generating function (EGF)

The ''exponential generating function'' of a sequence ''a''''n'' is :\operatorname(a_n;x)=\sum _^\infty a_n \frac. Exponential generating functions are generally more convenient than ordinary generating functions for
combinatorial enumeration Enumerative combinatorics is an area of combinatorics that deals with the number of ways that certain patterns can be formed. Two examples of this type of problem are counting combinations and counting permutations. More generally, given an infini ...
problems that involve labelled objects.

Poisson generating function

The ''Poisson generating function'' of a sequence ''a''''n'' is :\operatorname(a_n;x)=\sum _^\infty a_n e^ \frac = e^\, \operatorname(a_n;x).

Lambert series

The ''
Lambert series In mathematics, a Lambert series, named for Johann Heinrich Lambert, is a Series (mathematics), series taking the form :S(q)=\sum_^\infty a_n \frac . It can be resumed Formal series, formally by expanding the denominator: :S(q)=\sum_^\infty a_ ...
'' of a sequence ''a''''n'' is :\operatorname(a_n;x)=\sum _^\infty a_n \frac. The Lambert series coefficients in the power series expansions b_n := ^n\operatorname(a_n;x) for integers n \geq 1 are related by the
divisor sum In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities a ...
b_n = \sum_ a_d. The main article provides several more classical, or at least well-known examples related to special
arithmetic functions In number theory, an arithmetic, arithmetical, or number-theoretic function is for most authors any Function (mathematics), function ''f''(''n'') whose domain is the natural number, positive integers and whose range is a subset of the complex num ...
number theory Number theory (or arithmetic or higher arithmetic in older usage) is a branch of devoted primarily to the study of the s and . German mathematician (1777–1855) said, "Mathematics is the queen of the sciences—and number theory is the queen ...

number theory
. In a Lambert series the index ''n'' starts at 1, not at 0, as the first term would otherwise be undefined.

Bell series

Bell series In mathematics, the Bell series is a formal power series used to study properties of arithmetical functions. Bell series were introduced and developed by Eric Temple Bell. Given an arithmetic function f and a Prime number, prime p, define the forma ...
of a sequence ''a''''n'' is an expression in terms of both an indeterminate ''x'' and a prime ''p'' and is given by :\operatorname_p(a_n;x)=\sum_^\infty a_x^n.

Dirichlet series generating functions (DGFs)

Formal Dirichlet series In mathematics, a Dirichlet series is any series (mathematics), series of the form \sum_^\infty \frac, where ''s'' is Complex number, complex, and a_n is a complex sequence. It is a special case of general Dirichlet series. Dirichlet series play a ...
are often classified as generating functions, although they are not strictly formal power series. The ''Dirichlet series generating function'' of a sequence ''a''''n'' is :\operatorname(a_n;s)=\sum _^\infty \frac. The Dirichlet series generating function is especially useful when ''a''''n'' is a
multiplicative function In number theory, a multiplicative function is an arithmetic function ''f''(''n'') of a positive integer ''n'' with the property that ''f''(1) = 1 and f(ab) = f(a)f(b) whenever ''a'' and ''b'' are coprime. An arithmetic function ''f''(''n'') is ...
, in which case it has an
Euler product In number theory, an Euler product is an expansion of a Dirichlet series into an infinite product indexed by prime numbers. The original such product was given for Proof of the Euler product formula for the Riemann zeta function, the sum of all posi ...
expression in terms of the function's Bell series :\operatorname(a_n;s)=\prod_ \operatorname_p(a_n;p^)\,. If ''a''''n'' is a
Dirichlet character In analytic number theory 300px, Riemann zeta function ''ζ''(''s'') in the complex plane. The color of a point ''s'' encodes the value of ''ζ''(''s''): colors close to black denote values close to zero, while hue encodes the value's Argument (com ...
then its Dirichlet series generating function is called a
Dirichlet L-series In mathematics, a Dirichlet ''L''-series is a function of the form :L(s,\chi) = \sum_^\infty \frac. Here \chi is a Dirichlet character and ''s'' a complex variable with real part greater than 1. By analytic continuation, this function can be ex ...
. We also have a relation between the pair of coefficients in the
Lambert series In mathematics, a Lambert series, named for Johann Heinrich Lambert, is a Series (mathematics), series taking the form :S(q)=\sum_^\infty a_n \frac . It can be resumed Formal series, formally by expanding the denominator: :S(q)=\sum_^\infty a_ ...
expansions above and their DGFs. Namely, we can prove that ^n\operatorname(a_n; x) = b_n if and only if \operatorname(a_n;s) \zeta(s) = \operatorname(b_n;s) where \zeta(s) is the
Riemann zeta function The Riemann zeta function or Euler–Riemann zeta function, denoted by the Greek alphabet, Greek letter (zeta), is a function (mathematics), mathematical function of a complex variable, and can be expressed as: \zeta(s) = \sum_^\infty \frac = ...

Riemann zeta function

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 In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...
are generated by :e^=\sum_^\infty \frac t^n where ''p''''n''(''x'') is a sequence of polynomials and ''f''(''t'') is a function of a certain form.
Sheffer sequence In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and t ...
s 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 fundamental 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#Closed-form_formula, geometric series :\sum_^\infty x^n= \frac. 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 ''x''0 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 progression, geometric sequence 1, ''a'', ''a''2, ''a''3, ... for any constant ''a'': :\sum_^\infty(ax)^n= \frac. (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, :\sum_^\infty(-1)^nx^n= \frac. 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, ... (which skips over ''x'', ''x''3, ''x''5, ...) one gets the generating function :\sum_^\infty x^=\frac. 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 :\sum_^\infty(n+1)x^n= \frac, and the third power has as coefficients the triangular numbers 1, 3, 6, 10, 15, 21, ... whose term ''n'' is the binomial coefficient \tbinom2, so that :\sum_^\infty\binom2 x^n= \frac. More generally, for any non-negative integer ''k'' and non-zero real value ''a'', it is true that :\sum_^\infty a^n\binomk x^n= \frac\,. Since :2\binom2 - 3\binom1 + \binom0 = 2\frac2 -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(n^2;x) = \sum_^\infty n^2x^n = \frac - \frac + \frac = \frac. 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: : \begin G(n^2;x) & =\sum_^\infty n^2x^n = \sum_^\infty n(n-1) x^n + \sum_^\infty n x^n \\ & = x^2 D^2\left[\frac\right] + x D\left[\frac\right] \\ & = \frac + \frac =\frac. \end By induction, we can similarly show for positive integers m \geq 1 that :n^m = \sum_^m \left\ \frac, where \left\ denote the Stirling numbers of the second kind and where the generating function \sum_ n! / (n-j)! \, z^n = j! \cdot z^j / (1-z)^, so that we can form the analogous generating functions over the integral m-th powers generalizing the result in the square case above. In particular, since we can write \frac = \sum_^k \binom \frac, we can apply a well-known finite sum identity involving the Stirling numbers to obtain that :\sum_ n^m z^n = \sum_^ \left\ \frac.

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 :f_n = p_1(n) \rho_1^n + \cdots + p_(n) \rho_^n, where the reciprocal roots, \rho_i \in \mathbb, are fixed scalars and where p_i(n) is a polynomial in n for all 1 \leq i \leq \ell. In general, Generating function transformation#Hadamard products and diagonal generating functions, Hadamard products of rational functions produce rational generating functions. Similarly, if F(s, t) := \sum_ f(m, n) w^m z^n is a bivariate rational generating function, then its corresponding ''diagonal generating function'', \operatorname(F) := \sum_ f(n, n) z^n, is ''algebraic''. For example, if we let :F(s, t) := \sum_ \binom s^i t^j = \frac, then this generating function's diagonal coefficient generating function is given by the well-known OGF formula :\operatorname(F) = \sum_ \binom z^n = \frac. This result is computed in many ways, including Cauchy's integral formula or contour integration, taking complex residue (complex analysis), residues, or by direct manipulations of
formal power series In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained (), and quantities and their changes ( and ). There is no gener ...
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) :(a_0, a_0 + a_1, a_0 + a_1 + a_2, \ldots) of a sequence with ordinary generating function ''G''(''an''; ''x'') has the generating function :G(a_n; x) \cdot \frac because 1/(1 − ''x'') is the ordinary generating function for the sequence (1, 1, ...). See also the Generating function#Convolution .28Cauchy products.29, 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 \geq 1, we have the following two analogous identities for the modified generating functions enumerating the shifted sequence variants of \langle g_ \rangle and \langle g_ \rangle, respectively: : \begin z^m G(z) & = \sum_ g_ z^n \\ \frac & = \sum_ g_ z^n. \end

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: : \begin G^\prime(z) & = \sum_ (n+1) g_ z^n \\ z \cdot G^(z) & = \sum_ n g_ z^n \\ \int_0^z G(t) \, dt & = \sum_ \frac z^n. \end The differentiation–multiplication operation of the second identity can be repeated k times to multiply the sequence by n^k, but that requires alternating between differentiation and multiplication. If instead doing k differentiations in sequence, the effect is to multiply by the kth falling factorial: : z^k G^(z) = \sum_ n^ g_n z^n = \sum_ n (n-1) \dotsb (n-k+1) g_n z^n \text k \in \mathbb. Using the Stirling numbers of the second kind, that can be turned into another formula for multiplying by n^k as follows (see the main article on Generating function transformation#Derivative transformations, generating function transformations): : \sum_^k \left\ z^j F^(z) = \sum_ n^k f_n z^n \text k \in \mathbb. A negative-order reversal of this sequence powers formula corresponding to the operation of repeated integration is defined by the Generating function transformation#Derivative transformations, zeta series transformation and its generalizations defined as a derivative-based generating function transformation, transformation of generating functions, or alternately termwise by an performing an Generating function transformation#Polylogarithm series transformations, integral transformation on the sequence generating function. Related operations of performing fractional calculus, fractional integration on a sequence generating function are discussed Generating function transformation#Fractional integrals and derivatives, here.

Enumerating arithmetic progressions of sequences

In this section we give formulas for generating functions enumerating the sequence \ given an ordinary generating function F(z) where a, b \in \mathbb, a \geq 2, and 0 \leq b < a (see the generating function transformation, main article on transformations). For a=2 , this is simply the familiar decomposition of a function into even and odd functions, even and odd parts (i.e., even and odd powers): : \sum_ f_ z^ = \frac\left(F(z) + F(-z)\right) : \sum_ f_ z^ = \frac\left(F(z) - F(-z)\right). More generally, suppose that a \geq 3 and that \omega_a = \exp\left( 2\pi\imath / a \right) denotes the ath root of unity, primitive root of unity. Then, as an application of the discrete Fourier transform, we have the formula :\sum_ f_ z^ = \frac \sum_^ \omega_a^ F\left(\omega_a^ z\right). For integers m \geq 1, another useful formula providing somewhat ''reversed'' floored arithmetic progressions — effectively repeating each coefficient m times — are generated by the identity :\sum_ f_ z^n = \frac F(z^m) = \left(1 + z + \cdots + z^ + z^\right) F(z^m).

P-recursive sequences and holonomic generating functions


A formal power series (or function) F(z) is said to be holonomic if it satisfies a linear differential equation of the form :c_0(z) F^(z) + c_1(z) F^(z) + \cdots + c_r(z) F(z) = 0, where the coefficients c_i(z) are in the field of rational functions, \mathbb(z). Equivalently, F(z) is holonomic if the vector space over \mathbb(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, c_i(z) are polynomials in z. Thus we can see an equivalent condition that a generating function is holonomic if its coefficients satisfy a P-recurrence of the form :\widehat_s(n) f_ + \widehat_(n) f_ + \cdots + \widehat_0(n) f_n = 0, for all large enough n \geq n_0 and where the \widehat_i(n) are fixed finite-degree polynomials in 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 Generating function transformation#Hadamard products and diagonal generating functions, Hadamard product operation \odot on generating functions.


The functions e^z, \log(z), \cos(z), \arcsin(z), \sqrt, the dilogarithm function \operatorname_2(z), the generalized hypergeometric functions _pF_q(...;...;z) and the functions defined by the power series \sum_ z^n / (n!)^2 and the non-convergent \sum_ n! \cdot z^n are all holonomic. Examples of P-recursive sequences with holonomic generating functions include f_n := \frac \binom and f_n := 2^n / (n^2+1), where sequences such as \sqrt and \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), \sec(z), and \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 th
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. 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 Absolute convergence, converges absolutely, :G \left ( a_n; e^ \right) = \sum_^\infty a_n e^ is the discrete-time Fourier transform of the sequence ''a''0, ''a''1, ….

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 analysis, asymptotic growth of the underlying sequence. For instance, if an ordinary generating function ''G''(''a''''n''; ''x'') that has a finite radius of convergence of ''r'' can be written as :G(a_n; x) = \frac where each of ''A''(''x'') and ''B''(''x'') is a function that is analytic function, analytic to a radius of convergence greater than ''r'' (or is Entire function, entire), and where ''B''(''r'') ≠ 0 then :a_n \sim \frac \, n^(1/r)^ \sim \frac \binom(1/r)^ = \frac \left(\!\!\binom\!\!\right)(1/r)^\,, 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 ''a''''n''. In particular, :G\left(a_n - \frac \binom(1/r)^; x \right) = G(a_n; x) - \frac \left(1 - \frac\right)^\,. 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 ''a''''n''/''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 :\frac. With ''r'' = 1, α = −1, β = 3, ''A''(''x'') = 0, and ''B''(''x'') = ''x''+1, we can verify that the squares grow as expected, like the squares: :a_n \sim \frac \, n^ \left (\frac \right )^ = \frac\,n^ (1/1)^n = n^2.

Asymptotic growth of the Catalan numbers

The ordinary generating function for the Catalan numbers is :\frac. With ''r'' = 1/4, α = 1, β = −1/2, ''A''(''x'') = 1/2, and ''B''(''x'') = −1/2, we can conclude that, for the Catalan numbers, :a_n \sim \frac \, n^ \left(\frac1r \right)^n = \frac \, n^ \left(\frac1\right)^n = \frac.

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 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 \binom for all ''k'' and ''n''. To do this, consider (1+x)^n as itself a sequence, in ''n'', and find the generating function in ''y'' that has these sequence values as coefficients. Since the generating function for a^n is :\frac, the generating function for the binomial coefficients is: :\sum_ \binom x^k y^n = \frac=\frac.

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


Expansions of (formal) ''Jacobi-type'' and ''Stieltjes-type'' generalized continued fraction, continued fractions (''J-fractions'' and ''S-fractions'', respectively) whose h^ rational convergents represent Order of accuracy, 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 for some specific, application-dependent component sequences, \ and \, where z \neq 0 denotes the formal variable in the second power series expansion given below: : \begin J^(z) & = \cfrac \\ & = 1 + c_1 z + \left(\text_2+c_1^2\right) z^2 + \left(2 \text_2 c_1+c_1^3 + \text_2 c_2\right) z^3 + \cdots. \end The coefficients of z^n, denoted in shorthand by j_n := [z^n] J^(z), in the previous equations correspond to matrix solutions of the equations :\begink_ & k_ & 0 & 0 & \cdots \\ k_ & k_ & k_ & 0 & \cdots \\ k_ & k_ & k_ & k_ & \cdots \\ \vdots & \vdots & \vdots & \vdots \end = \begink_ & 0 & 0 & 0 & \cdots \\ k_ & k_ & 0 & 0 & \cdots \\ k_ & k_ & k_ & 0 & \cdots \\ \vdots & \vdots & \vdots & \vdots \end \cdot \beginc_1 & 1 & 0 & 0 & \cdots \\ \text_2 & c_2 & 1 & 0 & \cdots \\ 0 & \text_3 & c_3 & 1 & \cdots \\ \vdots & \vdots & \vdots & \vdots \end, where j_0 \equiv k_ = 1, j_n = k_ for n \geq 1, k_ = 0 if r > s, and where for all integers p, q \geq 0, we have an ''addition formula'' relation given by :j_ = k_ \cdot k_ + \sum_^ \text_2 \cdots \text_ \times k_ \cdot k_.

Properties of the th convergent functions

For h \geq 0 (though in practice when h \geq 2), we can define the rational h^\text convergents to the infinite J-fraction, J^(z), expanded by :\operatorname_h(z) := \frac = j_0 + j_1 z + \cdots + j_ z^ + \sum_ \widetilde_ z^n, component-wise through the sequences, P_h(z) and Q_h(z), defined recursively by : \begin P_h(z) & = (1-c_h z) P_(z) - \text_h z^2 P_(z) + \delta_ \\ Q_h(z) & = (1-c_h z) Q_(z) - \text_h z^2 Q_(z) + (1-c_1 z) \delta_ + \delta_. \end Moreover, the rationality of the convergent function, \text_h(z) for all h \geq 2 implies additional finite difference equations and congruence properties satisfied by the sequence of j_n, ''and'' for M_h := \text_2 \cdots \text_ if h , \mid M_h then we have the congruence :j_n \equiv [z^n] \operatorname_h(z) \pmod h, for non-symbolic, determinate choices of the parameter sequences, \ and \, when h \geq 2, i.e., when these sequences do not implicitly depend on an auxiliary parameter such as q, x, or R as in the examples contained in the table below.


The next table provides examples of closed-form formulas for the component sequences found computationally (and subsequently proved correct in the cited references ) in several special cases of the prescribed sequences, j_n, generated by the general expansions of the J-fractions defined in the first subsection. Here we define 0 < , a, , , b, , , q, < 1 and the parameters R, \alpha \in \mathbb^ and 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. 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.


Generating functions for the sequence of square numbers ''a''''n'' = ''n''2 are:

Ordinary generating function

:G(n^2;x)=\sum_^\infty n^2x^n = \frac

Exponential generating function

:\operatorname(n^2;x)=\sum _^\infty \frac=x(x+1)e^x

Lambert series

As an example of a Lambert series identity not given in the Lambert series, main article, we can show that for , x, , , xq, < 1 we have that :\sum_ \frac = \sum_ \frac + \sum_ \frac, where we have the special case identity for the generating function of the divisor function, d(n) \equiv \sigma_0(n), given by :\sum_ \frac = \sum_ \frac.

Bell series

:\operatorname_p(n^2;x)=\sum_^\infty (p^)^2x^n=\frac

Dirichlet series generating function

:\operatorname(n^2;s)=\sum_^\infty \frac=\zeta(s-2), using the
Riemann zeta function The Riemann zeta function or Euler–Riemann zeta function, denoted by the Greek alphabet, Greek letter (zeta), is a function (mathematics), mathematical function of a complex variable, and can be expressed as: \zeta(s) = \sum_^\infty \frac = ...

Riemann zeta function
. The sequence ''ak'' generated by a Dirichlet series generating function (DGF) corresponding to: :\operatorname(a_k;s)=\zeta(s)^m where \zeta(s) is the
Riemann zeta function The Riemann zeta function or Euler–Riemann zeta function, denoted by the Greek alphabet, Greek letter (zeta), is a function (mathematics), mathematical function of a complex variable, and can be expressed as: \zeta(s) = \sum_^\infty \frac = ...

Riemann zeta function
, has the ordinary generating function: :\sum_^ a_k x^k = x + \sum_ x^ + \underset x^ + \underset x^ + \underset x^ + \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 t_1,\ldots t_r and the column sums are s_1,\ldots s_c. Then, according to I. J. Good, the number of such tables is the coefficient of :x_1^\ldots x_r^y_1^\ldots y_c^ in :\prod_^\prod_^c\frac. In the bivariate case, non-polynomial double sum examples of so-termed "''double''" or "''super''" generating functions of the form G(w, z) := \sum_ g_ w^m z^n include the following two-variable generating functions for the binomial coefficients, the Stirling numbers, and the Eulerian numbers: : \begin e^ & = \sum_ \binom w^m \frac \\ e^ & = \sum_ \left\ w^m \frac \\ \frac & = \sum_ \left[\begin n \\ m \end \right] w^m \frac \\ \frac & = \sum_ \left\langle\begin n \\ m \end \right\rangle w^m \frac \\ \frac &= \sum_ \left\langle\begin m+n+1 \\ m \end \right\rangle \frac. \end


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 s_n = \sum_^. We then know that S(z) = \frac for the corresponding ordinary generating functions. For example, we can manipulate s_n=\sum_^ H_, where H_k = 1 + \frac + \cdots + \frac are the harmonic numbers. Let H(z) = \sum_ be the ordinary generating function of the harmonic numbers. Then :H(z) = \dfrac\,, and thus :S(z) = \sum_ = \dfrac\,. Using \frac = \sum_, Generating function#Convolution .28Cauchy products.29, convolution with the numerator yields :s_n = \sum_^ = (n+1)H_n - n\,, which can also be written as :\sum_^ = (n+1)(H_ - 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 \langle f_n \rangle we define the two sequences of sums :s_n := \sum_^n \binom f_m 3^ :\widetilde_n := \sum_^n \binom (m+1)(m+2)(m+3) f_m 3^, for all n \geq 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) = \frac F\left(\frac\right). Since the generating function for the sequence \langle (n+1)(n+2)(n+3) f_n \rangle is given by 6 F(z) + 18z F^(z) + 9z^2 F^(z) + z^3 F^(z), we may write the generating function for the second sum defined above in the form :\widetilde(z) = \frac F\left(\frac\right)+\frac F^\left(\frac\right)+\frac F^\left(\frac\right)+\frac F^\left(\frac\right). In particular, we may write this modified sum generating function in the form of :a(z) \cdot S(z) + b(z) \cdot z S^(z) + c(z) \cdot z^2 S^(z) + d(z) \cdot z^3 S^(z), for a(z) = 6(1-3z)^3, b(z) = 18 (1-3z)^3, c(z) = 9 (1-3z)^3, and d(z) = (1-3z)^3 where (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: : \begin \widetilde_n & = [z^n]\left(6(1-3z)^3 \sum_ s_n z^n + 18 (1-3z)^3 \sum_ n s_n z^n + 9 (1-3z)^3 \sum_ n(n-1) s_n z^n + (1-3z)^3 \sum_ n(n-1)(n-2) s_n z^n\right) \\ & = (n+1)(n+2)(n+3) s_n - 9 n(n+1)(n+2) s_ + 27 (n-1)n(n+1) s_ - (n-2)(n-1)n s_. \end

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 U_n) to tile a 3 \times n rectangle with unmarked 2 \times 1 domino pieces. Let the auxiliary sequence, V_n, be defined as the number of ways to cover a 3 \times n rectangle-minus-corner section of the full rectangle. We seek to use these definitions to give a closed form formula for 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 + 3z^2 + 11 z^4 + 41 z^6 + \cdots :V(z) = z + 4z^3 + 15 z^5 + 56 z^7 + \cdots. If we consider the possible configurations that can be given starting from the left edge of the 3 \times n rectangle, we are able to express the following mutually dependent, or ''mutually recursive'', recurrence relations for our two sequences when n \geq 2 defined as above where U_0 = 1, U_1 = 0, V_0 = 0, and V_1 = 1: : \begin U_n & = 2 V_ + U_ \\ V_n & = U_ + V_. \end Since we have that for all integers m \geq 0, the index-shifted generating functions satisfy z^m G(z) = \sum_ g_ z^n (incidentally, we also have a corresponding formula when m < 0 given by \sum_ g_ z^n = \frac), 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 : \begin U(z) & = 2z V(z) + z^2 U(z) + 1 \\ V(z) & = z U(z) + z^2 V(z) \\ & = \frac U(z), \end which then implies by solving the system of equations (and this is the particular trick to our method here) that :U(z) = \frac = \frac \cdot \frac + \frac \cdot \frac. 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 U_ \equiv 0 and that :U_ = \left\lceil \frac \right\rceil, for all integers n \geq 0. We also note that the same shifted generating function technique applied to the second-order recurrence relation, 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). #Consider ''A''(''z'') and ''B''(''z'') are ordinary generating functions. #:C(z) = A(z)B(z) \Leftrightarrow [z^n]C(z) = \sum_^ #Consider ''A''(''z'') and ''B''(''z'') are exponential generating functions. #:C(z) = A(z)B(z) \Leftrightarrow [z^n/n!]C(z) = \sum_^n \binom a_k b_ #Consider the triply convolved sequence resulting from the product of three ordinary generating functions #:C(z) = F(z) G(z) H(z) \Leftrightarrow [z^n]C(z) = \sum_ f_j g_k h_\ell #Consider the m-fold convolution of a sequence with itself for some positive integer m \geq 1 (see the example below for an application) #:C(z) = G(z)^m \Leftrightarrow [z^n]C(z) = \sum_ g_ g_ \cdots g_ 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 is denoted by G_Z(z), then we can show that for any two random variables :G_(z) = G_X(z) G_Y(z), if X and Y are independent. Similarly, the number of ways to pay n \geq 0 cents in coin denominations of values in the set \ (i.e., in pennies, nickels, dimes, quarters, and half dollars, respectively) is generated by the product :C(z) = \frac \frac \frac \frac \frac, and moreover, if we allow the 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 (mathematics), partition function generating function expanded by the infinite q-Pochhammer symbol product of \prod_ \left(1 - z^n\right)^.

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, C_n. In particular, this sequence has the combinatorial interpretation as being the number of ways to insert parentheses into the product x_0 \cdot x_1 \cdots x_n so that the order of multiplication is completely specified. For example, C_2 = 2 which corresponds to the two expressions x_0 \cdot (x_1 \cdot x_2) and (x_0 \cdot x_1) \cdot x_2. It follows that the sequence satisfies a recurrence relation given by :C_n = \sum_^ C_k C_ + \delta_ = C_0 C_ + C_1 C_ + \cdots + C_ C_0 + \delta_,\ n \geq 0, and so has a corresponding convolved generating function, C(z), satisfying :C(z) = z \cdot C(z)^2 + 1. Since C(0) = 1 \neq \infty, we then arrive at a formula for this generating function given by : \begin C(z) & = \frac \\ & = \sum_ \frac\binom z^n. \end Note that the first equation implicitly defining C(z) above implies that :C(z) = \frac, 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'' is defined to be a graph on the vertices \ with 2n-1 edges connected according to the following rules: Vertex 0 is connected by a single edge to each of the other n vertices, and vertex k is connected by a single edge to the next vertex k+1 for all 1 \leq k < n. 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 f_n of a fan of order n are possible for each n \geq 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, we have that f_4 = 4 + 3 \cdot 1 + 2 \cdot 2 + 1 \cdot 3 + 2 \cdot 1 \cdot 1 + 1 \cdot 2 \cdot 1 + 1 \cdot 1 \cdot 2 + 1\cdot1\cdot1\cdot1\cdot1 = 21, which is a sum over the m-fold convolutions of the sequence g_n = n = [z^n] z / (1-z)^2 for m := 1,2,3,4. More generally, we may write a formula for this sequence as :f_n = \sum_ \sum_ g_ g_ \cdots g_, from which we see that the ordinary generating function for this sequence is given by the next sum of convolutions as : \begin F(z) & = G(z) + G(z)^2 + G(z)^3 + \cdots \\[6pt] & = \frac \\[6pt] & = \frac = \frac, \end 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 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 as limit in the summation. When n does not appear explicitly in the summation, we may consider n as a “free” parameter and treat s_n as a coefficient of F(z) = \sum, change the order of the summations on n and k, and try to compute the inner sum. For example, if we want to compute :s_n = \sum_ \quad (m,n \in \mathbb_0) we can treat n as a "free" parameter, and set :F(z) = \sum_z^n Interchanging summation (“snake oil”) gives :F(z) = \sum_\sum_ Now the inner sum is \frac. Thus : \begin F(z) &= \frac\sum_ \\ &= \frac\sum_ \quad \text C_k = k^\text \text \\ &= \frac\frac \\ &= \frac(1-\frac) \\ &= \frac = z\frac. \end Then we obtain :s_n = \binom\quad \text \quad m\geq1 \quad,\quad s_n = [n = 0]\quad \text \quad m = 0.

Generating functions prove congruences

We say that two generating functions (power series) are congruent modulo m, written A(z) \equiv B(z) \pmod if their coefficients are congruent modulo m for all n \geq 0, i.e., a_n \equiv b_n \pmod for all relevant cases of the integers n (note that we need not assume that m is an integer here—it may very well be polynomial-valued in some indeterminate x, for example). If the "''simpler''" right-hand-side generating function, B(z), is a rational function of z, then the form of this sequences suggests that the sequence is periodic function, eventually periodic modulo fixed particular cases of integer-valued m \geq 2. For example, we can prove that the Euler numbers, \langle E_n \rangle = \langle 1, 1, 5, 61, 1385, \ldots \rangle \longmapsto \langle 1,1,2,1,2,1,2,\ldots \rangle \pmod, satisfy the following congruence modulo 3: :\sum_ E_n z^n = \frac \pmod. 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'' 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) is represented by an infinite continued fraction of the form ::A(z) = \frac \frac \frac \cdots , ::and that A_p(z) denotes the p^ convergent to this continued fraction expansion defined such that a_n = [z^n] A_p(z) for all 0 \leq n < 2p. Then 1) the function A_p(z) is rational for all p \geq 2 where we assume that one of divisibility criteria of p, p_1, p_1p_2, p_1p_2p_3\cdots is met, i.e., p , p_1 p_2 \cdots p_k for some k \geq 1; and 2) If the integer p divides the product p_1 p_2 \cdots p_k, then we have that A(z) \equiv A_k(z) \pmod. 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) which show the versatility of generating functions in tackling problems involving integer sequences.

The Stirling numbers modulo small integers

The Stirling numbers of the first kind#Congruences, main article on the Stirling numbers generated by the finite products :S_n(x) := \sum_^n \left[\begin n \\ k \end \right] x^k = x(x+1)(x+2) \cdots (x+n-1),\ 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 reference ''Generatingfunctionology''. We repeat the basic argument and notice that when reduces modulo 2, these finite product generating functions each satisfy :S_n(x) = [x(x+1)] \cdot [x(x+1)] \cdots = x^ (x+1)^, which implies that the parity of these Stirling numbers matches that of the binomial coefficient :\left[\begin n \\ k \end \right] \equiv \binom \pmod, and consequently shows that \left[\begin n \\ k \end \right] is even whenever k < \left\lceil \frac \right\rceil. 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 : \begin \left[\begin n \\ m \end \right] & \equiv [x^m] \left( x^ (x+1)^ (x+2)^ \right) && \pmod \\ & \equiv \sum_^ \binom \binom \times 2^ && \pmod. \end

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 (number theory), partition function p(n) is generated by the reciprocal infinite q-Pochhammer symbol product (or z-Pochhammer product as the case may be) given by : \begin \sum_ p(n) z^n & = \frac \\[4pt] & = 1 + z + 2z^2 + 3 z^3 + 5z^4 + 7z^5 + 11z^6 + \cdots. \end This partition function satisfies many known Ramanujan's congruences, 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: : \begin p(5m+4) & \equiv 0 \pmod \\ p(7m+5) & \equiv 0 \pmod \\ p(11m+6) & \equiv 0 \pmod \\ p(25m+24) & \equiv 0 \pmod. \end 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, satisfies that each of its coefficients are divisible by 5 with the exception of those which correspond to the powers of 1, z^5, z^, \ldots, all of which otherwise have a remainder of 1 modulo 5. Thus we may write :\frac \equiv \frac \pmod \qquad \iff \qquad \frac \equiv 1 \pmod, which in particular shows us that :\frac \equiv 1 \pmod. Hence, we easily see that 5 divides each coefficient of z^ in the infinite product expansions of :z \cdot \frac = z \cdot \left\^ \times \frac. Finally, since we may write the generating function for the partition function as : \begin & \frac \\[5pt] = & z \cdot \frac \times (1+z^5+z^+\cdots)(1+z^+z^+\cdots) \cdots \\[5pt] = & z + \sum_ p(n-1) z^n, \end we may equate the coefficients of z^ in the previous equations to prove our desired congruence result, namely that, p(5m+4) \equiv 0 \pmod for all m \geq 0.

Transformations of generating functions

There are a number of transformations of generating functions that provide other applications (see the generating function transformation, 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 Generating function transformation#Integral Transformations, integral transformations) or weighted sums over the higher-order derivatives of these functions (see Generating function transformation#Derivative Transformations, derivative transformations). Generating function transformations can come into play when we seek to express a generating function for the sums :s_n := \sum_^ \binom C_ a_m, in the form of S(z) = g(z) A(f(z)) involving the original sequence generating function. For example, if the sums s_n := \sum_ \binom a_k, then the generating function for the modified sum expressions is given by S(z) = \frac A\left(\frac\right) (see also the binomial transform and the Stirling transform). exercise 5.71 There are also integral formulas for converting between a sequence's OGF, F(z), and its exponential generating function, or EGF, \widehat(z), and vice versa given by :F(z) = \int_0^\infty \widehat(tz) e^ \, dt :\widehat(z) = \frac \int_^\pi F\left(z e^\right) e^ \, d\vartheta, provided that these integrals converge for appropriate values of z.

Other applications

Generating functions are used to: * Find a closed formula for a sequence given in a recurrence relation. For example, consider Fibonacci number#Power series, 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 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 generating function transformation#Hadamard products and diagonal generating functions, integral transformations

Convolution polynomials

Knuth's article titled "''Convolution Polynomials''" defines a generalized class of ''convolution polynomial'' sequences by their special generating functions of the form :F(z)^x = \exp\left(x \log F(z)\right) = \sum_ f_n(x) z^n, for some analytic function F with a power series expansion such that F(0) = 1. We say that a family of polynomials, f_0, f_1, f_2, \ldots, forms a ''convolution family'' if \deg\ \leq n and if the following convolution condition holds for all x, y and for all n \geq 0: :f_n(x+y) = f_n(x) f_0(y) + f_(x) f_1(y) + \cdots + f_1(x) f_(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! \cdot f_n(x) is of
binomial type In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...
* Special values of the sequence include f_n(1) = [z^n] F(z) and f_n(0) = \delta_, and * For arbitrary (fixed) x, y, t \in \mathbb, these polynomials satisfy convolution formulas of the form : \begin f_n(x+y) & = \sum_^n f_k(x) f_(y) \\ f_n(2x) & = \sum_^n f_k(x) f_(x) \\ xn f_n(x+y) & = (x+y) \sum_^n k f_k(x) f_(y) \\ \frac & = \sum_^n \frac \frac. \end For a fixed non-zero parameter t \in \mathbb, we have modified generating functions for these convolution polynomial sequences given by : \frac = [z^n] \mathcal_t(z)^x, where \mathcal_t(z) is implicitly defined by a functional equation of the form \mathcal_t(z) = F\left(x \mathcal_t(z)^t\right). Moreover, we can use matrix methods (as in the reference) to prove that given two convolution polynomial sequences, \langle f_n(x) \rangle and \langle g_n(x) \rangle, with respective corresponding generating functions, F(z)^x and G(z)^x, then for arbitrary t we have the identity :[z^n] \left(G(z) F\left(z G(z)^t\right)\right)^x = \sum_^n F_k(x) G_(x+tk). Examples of convolution polynomial sequences include the ''binomial power series'', \mathcal_t(z) = 1 + z \mathcal_t(z)^t, so-termed ''tree polynomials'', the Bell numbers, B(n), the Laguerre polynomials, and the Stirling polynomial, Stirling convolution polynomials.

Tables of special generating functions

An initial listing of special mathematical series is found List of mathematical series, 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.See also the ''1031 Generating Functions'' found in


George Pólya George Pólya (; hu, Pólya György ) (December 13, 1887 – September 7, 1985) was a Hungarian mathematician A mathematician is someone who uses an extensive knowledge of mathematics Mathematics (from Ancient Greek, Greek: ) includes t ...
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 Number theory, 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



* * Reprinted in * * * * *

External links

"Introduction To Ordinary Generating Functions"
by Mike Zabrocki, York University, Mathematics and Statistics *
Generating Functions, Power Indices and Coin Change
at cut-the-knot
"Generating Functions"
by Ed Pegg Jr., Wolfram Demonstrations Project, 2007. {{DEFAULTSORT:Generating Function Generating functions,