HOME

TheInfoList



OR:

In
mathematics Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, a generating function is a way of encoding an
infinite sequence In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is called t ...
of numbers () by treating them as the
coefficient In mathematics, a coefficient is a multiplicative factor in some term of a polynomial, a series, or an expression; it is usually a number, but may be any expression (including variables such as , and ). When the coefficients are themselves var ...
s of a
formal power series In mathematics, a formal series is an infinite sum that is considered independently from any notion of convergence, and can be manipulated with the usual algebraic operations on series (addition, subtraction, multiplication, division, partial sum ...
. 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 *CONVERGE CFD s ...
: in fact, the generating function is not actually regarded as a
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
, and the "variable" remains an indeterminate. Generating functions were first introduced by
Abraham de Moivre Abraham de Moivre FRS (; 26 May 166727 November 1754) was a French mathematician known for de Moivre's formula, a formula that links complex numbers and trigonometry, and for his work on the normal distribution and probability theory. He moved ...
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  may involve arithmetic operations, differentiation with respect to  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 . Indeed, the closed form expression can often be interpreted as a function that can be evaluated at (sufficiently small) concrete values of , and which has the formal series as its
series expansion In mathematics, a series expansion is an expansion of a function into a series, or infinite sum. It is a method for calculating a function that cannot be expressed by just elementary operators (addition, subtraction, multiplication and division) ...
; 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, a series is the sum of the terms of an infinite sequence of numbers. More precisely, an infinite sequence (a_0, a_1, a_2, \ldots) defines a series that is denoted :S=a_0 +a_1+ a_2 + \cdots=\sum_^\infty a_k. The th partial sum ...
when a nonzero numeric value is substituted for . Also, not all expressions that are meaningful as functions of  are meaningful as expressions designating formal series; for example, negative and fractional powers of  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, the set of input values for which the (total) function is defined **Domain of definition of a partial function **Natural domain of a partial function **Domain of holomorphy of a function * Do ...
to a
codomain In mathematics, the codomain or set of destination of a function is the set into which all of the output of the function is constrained to fall. It is the set in the notation . The term range is sometimes ambiguously used to refer to either the ...
. 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.


Definitions


Ordinary generating function (OGF)

The ''ordinary generating function'' of a sequence is G(a_n;x)=\sum_^\infty a_n x^n. When the term ''generating function'' is used without qualification, it is usually taken to mean an ordinary generating function. If is the
probability mass function In probability and statistics, a probability mass function is a function that gives the probability that a discrete random variable is exactly equal to some value. Sometimes it is also known as the discrete density function. The probability mass ...
of a
discrete random variable A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which depends on random events. It is a mapping or a function from possible outcomes (e.g., the po ...
, then its ordinary generating function is called a
probability-generating function In probability theory, the probability generating function of a discrete random variable is a power series representation (the generating function) of the probability mass function of the random variable. Probability generating functions are oft ...
. The ordinary generating function can be generalized to arrays with multiple indices. For example, the ordinary generating function of a two-dimensional array (where and are natural numbers) is G(a_;x,y)=\sum_^\infty a_ x^m y^n.


Exponential generating function (EGF)

The ''exponential generating function'' of a sequence 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. Another benefit of exponential generating functions is that they are useful in transferring linear
recurrence relations In mathematics, a recurrence relation is an equation according to which the nth term of a sequence of numbers is equal to some combination of the previous terms. Often, only k previous terms of the sequence appear in the equation, for a parameter ...
to the realm of
differential equations In mathematics, a differential equation is an equation that relates one or more unknown functions and their derivatives. In applications, the functions generally represent physical quantities, the derivatives represent their rates of change, an ...
. For example, take the
Fibonacci sequence In mathematics, the Fibonacci numbers, commonly denoted , form a integer sequence, sequence, the Fibonacci sequence, in which each number is the sum of the two preceding ones. The sequence commonly starts from 0 and 1, although some authors start ...
that satisfies the linear recurrence relation . The corresponding exponential generating function has the form \operatorname(x) = \sum_^\infty \frac x^n and its derivatives can readily be shown to satisfy the differential equation as a direct analogue with the recurrence relation above. In this view, the factorial term is merely a counter-term to normalise the derivative operator acting on .


Poisson generating function

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


Lambert series

The ''Lambert series'' of a sequence 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 are related by the
divisor sum In mathematics, a divisor of an integer n, also called a factor of n, is an integer m that may be multiplied by some integer to produce n. In this case, one also says that n is a multiple of m. An integer n is divisible or evenly divisible by ...
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 ''f''(''n'') whose domain is the positive integers and whose range is a subset of the complex numbers. Hardy & Wright include in their de ...
in
number theory Number theory (or arithmetic or higher arithmetic in older usage) is a branch of pure mathematics devoted primarily to the study of the integers and arithmetic function, integer-valued functions. German mathematician Carl Friedrich Gauss (1777â ...
. In a Lambert series the index starts at 1, not at 0, as the first term would otherwise be undefined.


Bell series

The
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 p, define the formal power series ...
of a sequence is an expression in terms of both an indeterminate and a prime 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 is \operatorname(a_n;s)=\sum _^\infty \frac. The Dirichlet series generating function is especially useful when 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 the sum of all positive integers raised to a certain power as proven by Leonhard Eu ...
expression in terms of the function's Bell series \operatorname(a_n;s)=\prod_ \operatorname_p(a_n;p^)\,. If is a
Dirichlet character In analytic number theory and related branches of mathematics, a complex-valued arithmetic function \chi:\mathbb\rightarrow\mathbb is a Dirichlet character of modulus m (where m is a positive integer) if for all integers a and b: :1)   \chi ...
then its Dirichlet series generating function is called a Dirichlet -series. 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 taking the form :S(q)=\sum_^\infty a_n \frac . It can be resumed formally by expanding the denominator: :S(q)=\sum_^\infty a_n \sum_^\infty q^ = \sum_^\infty b_m ...
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 is the
Riemann zeta function The Riemann zeta function or Euler–Riemann zeta function, denoted by the Greek letter (zeta), is a mathematical function of a complex variable defined as \zeta(s) = \sum_^\infty \frac = \frac + \frac + \frac + \cdots for \operatorname(s) > ...
.


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, a polynomial sequence, i.e., a sequence of polynomials indexed by non-negative integers \left\ in which the index of each polynomial equals its degree, is said to be of binomial type if it satisfies the sequence of identities :p_ ...
are generated by e^=\sum_^\infty \frac t^n where is a sequence of polynomials and is a function of a certain form.
Sheffer sequence In mathematics, a Sheffer sequence or poweroid is a polynomial sequence, i.e., a sequence of polynomials in which the index of each polynomial equals its degree, satisfying conditions related to the umbral calculus in combinatorics. They are ...
s are generated in a similar way. See the main article
generalized Appell polynomials In mathematics, a polynomial sequence \ has a generalized Appell representation if the generating function for the polynomials takes on a certain form: :K(z,w) = A(w)\Psi(zg(w)) = \sum_^\infty p_n(z) w^n where the generating function or kernel K( ...
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 In algebraic topology, the Betti numbers are used to distinguish topological spaces based on the connectivity of ''n''-dimensional simplicial complexes. For the most reasonable finite-dimensional topological space, spaces (such as compact manifolds ...
and others. A fundamental generating function is that of the constant sequence , whose ordinary generating function is the
geometric series In mathematics, a geometric series is the sum of an infinite number of terms that have a constant ratio between successive terms. For example, the series :\frac \,+\, \frac \,+\, \frac \,+\, \frac \,+\, \cdots is geometric, because each succ ...
\sum_^\infty x^n= \frac. The left-hand side is the
Maclaurin series Maclaurin or MacLaurin is a surname. Notable people with the surname include: * Colin Maclaurin (1698–1746), Scottish mathematician * Normand MacLaurin (1835–1914), Australian politician and university administrator * Henry Normand MacLaurin ( ...
expansion of the right-hand side. Alternatively, the equality can be justified by multiplying the power series on the left by , and checking that the result is the constant power series 1 (in other words, that all coefficients except the one of are equal to 0). Moreover, there can be no other power series with this property. The left-hand side therefore designates the
multiplicative inverse In mathematics, a multiplicative inverse or reciprocal for a number ''x'', denoted by 1/''x'' or ''x''−1, is a number which when Multiplication, multiplied by ''x'' yields the multiplicative identity, 1. The multiplicative inverse of a rat ...
of 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 gives the generating function for the
geometric sequence In mathematics, a geometric progression, also known as a geometric sequence, is a sequence of non-zero numbers where each term after the first is found by multiplying the previous one by a fixed, non-zero number called the ''common ratio''. For e ...
for any constant : \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 by some power of , so for instance for the sequence (which skips over ) 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 and making a change of running variable , one sees that the coefficients form the sequence , so one has \sum_^\infty(n+1)x^n= \frac, and the third power has as coefficients the
triangular number A triangular number or triangle number counts objects arranged in an equilateral triangle. Triangular numbers are a type of figurate number, other examples being square numbers and cube numbers. The th triangular number is the number of dots in ...
s whose term is the
binomial coefficient In mathematics, the binomial coefficients are the positive integers that occur as coefficients in the binomial theorem. Commonly, a binomial coefficient is indexed by a pair of integers and is written \tbinom. It is the coefficient of the t ...
, so that \sum_^\infty\binom2 x^n= \frac. More generally, for any non-negative integer and non-zero real value , 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 of
square number In mathematics, a square number or perfect square is an integer that is the square (algebra), square of an integer; in other words, it is the multiplication, product of some integer with itself. For example, 9 is a square number, since it equals ...
s 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 mathematics, a geometric series is the sum of an infinite number of terms that have a constant ratio between successive terms. For example, the series :\frac \,+\, \frac \,+\, \frac \,+\, \frac \,+\, \cdots is geometric, because each succ ...
in the following form: \begin G(n^2;x) & = \sum_^\infty n^2x^n \\ px & = \sum_^\infty n(n-1) x^n + \sum_^\infty n x^n \\ px & = x^2 D^2\left frac\right+ x D\left frac\right\\ px & = \frac + \frac =\frac. \end By induction, we can similarly show for positive integers that n^m = \sum_^m \begin m \\ j \end \frac, where denote the
Stirling numbers of the second kind In mathematics, particularly in combinatorics, a Stirling number of the second kind (or Stirling partition number) is the number of ways to partition a set of ''n'' objects into ''k'' non-empty subsets and is denoted by S(n,k) or \textstyle \lef ...
and where the generating function \sum_^\infty \frac \, z^n = \frac, so that we can form the analogous generating functions over the integral 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 In mathematics, Stirling numbers arise in a variety of analytic and combinatorial problems. They are named after James Stirling, who introduced them in a purely algebraic setting in his book ''Methodus differentialis'' (1730). They were rediscove ...
to obtain that \sum_^\infty n^m z^n = \sum_^m \begin m+1 \\ j+1 \end \frac.


Rational functions

The ordinary generating function of a sequence can be expressed as a
rational function In mathematics, a rational function is any function that can be defined by a rational fraction, which is an algebraic fraction such that both the numerator and the denominator are polynomials. The coefficients of the polynomials need not be rat ...
(the ratio of two finite-degree polynomials) if and only if the sequence is a
linear recursive sequence In mathematics and theoretical computer science, a constant-recursive sequence is an infinite sequence of numbers where each number in the sequence is equal to a fixed linear combination of one or more of its immediate predecessors. A constant ...
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 A finite difference is a mathematical expression of the form . If a finite difference is divided by , one gets a difference quotient. The approximation of derivatives by finite differences plays a central role in finite difference methods for the ...
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 In mathematics, the Fibonacci numbers, commonly denoted , form a sequence, the Fibonacci sequence, in which each number is the sum of the two preceding ones. The sequence commonly starts from 0 and 1, although some authors start the sequence from ...
for the
Fibonacci numbers In mathematics, the Fibonacci numbers, commonly denoted , form a sequence, the Fibonacci sequence, in which each number is the sum of the two preceding ones. The sequence commonly starts from 0 and 1, although some authors start the sequence from ...
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_l(n) \rho_l^n, where the reciprocal roots, , are fixed scalars and where is a polynomial in for all . In general, 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_^\infty 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_^\infty \binom z^n = \frac. This result is computed in many ways, including
Cauchy's integral formula In mathematics, Cauchy's integral formula, named after Augustin-Louis Cauchy, is a central statement in complex analysis. It expresses the fact that a holomorphic function defined on a disk is completely determined by its values on the boundary o ...
or
contour integration In the mathematical field of complex analysis, contour integration is a method of evaluating certain integrals along paths in the complex plane. Contour integration is closely related to the calculus of residues, a method of complex analysis. ...
, taking complex
residue Residue may refer to: Chemistry and biology * An amino acid, within a peptide chain * Crop residue, materials left after agricultural processes * Pesticide residue, refers to the pesticides that may remain on or in food after they are applied ...
s, or by direct manipulations of
formal power series In mathematics, a formal series is an infinite sum that is considered independently from any notion of convergence, and can be manipulated with the usual algebraic operations on series (addition, subtraction, multiplication, division, partial sum ...
in two variables.


Operations on generating functions


Multiplication yields convolution

Multiplication of ordinary generating functions yields a discrete
convolution In mathematics (in particular, functional analysis), convolution is a operation (mathematics), mathematical operation on two function (mathematics), functions ( and ) that produces a third function (f*g) that expresses how the shape of one is ...
(the
Cauchy product In mathematics, more specifically in mathematical analysis, the Cauchy product is the discrete convolution of two infinite series. It is named after the French mathematician Augustin-Louis Cauchy. Definitions The Cauchy product may apply to infini ...
) of the sequences. For example, the sequence of cumulative sums (compare to the slightly more general
Euler–Maclaurin formula In mathematics, the Euler–Maclaurin formula is a formula for the difference between an integral and a closely related sum. It can be used to approximate integrals by finite sums, or conversely to evaluate finite sums and infinite series using ...
) (a_0, a_0 + a_1, a_0 + a_1 + a_2, \ldots) of a sequence with ordinary generating function has the generating function G(a_n; x) \cdot \frac because is the ordinary generating function for the sequence . See also the section on convolutions in the applications section of this article below for further examples of problem solving with convolutions of generating functions and interpretations.


Shifting sequence indices

For integers , we have the following two analogous identities for the modified generating functions enumerating the shifted sequence variants of and , respectively: \begin & z^m G(z) = \sum_^\infty g_ z^n \\ px& \frac = \sum_^\infty 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'(z) & = \sum_^\infty (n+1) g_ z^n \\ pxz \cdot G'(z) & = \sum_^\infty n g_ z^n \\ px\int_0^z G(t) \, dt & = \sum_^\infty \frac z^n. \end The differentiation–multiplication operation of the second identity can be repeated times to multiply the sequence by , but that requires alternating between differentiation and multiplication. If instead doing differentiations in sequence, the effect is to multiply by the th
falling factorial In mathematics, the falling factorial (sometimes called the descending factorial, falling sequential product, or lower factorial) is defined as the polynomial :\begin (x)_n = x^\underline &= \overbrace^ \\ &= \prod_^n(x-k+1) = \prod_^(x-k) \,. \e ...
: z^k G^(z) = \sum_^\infty n^\underline g_n z^n = \sum_^\infty n (n-1) \dotsb (n-k+1) g_n z^n \quad\text k \in \mathbb. Using the
Stirling numbers of the second kind In mathematics, particularly in combinatorics, a Stirling number of the second kind (or Stirling partition number) is the number of ways to partition a set of ''n'' objects into ''k'' non-empty subsets and is denoted by S(n,k) or \textstyle \lef ...
, that can be turned into another formula for multiplying by n^k as follows (see the main article on generating function transformations): \sum_^k \begin k \\ j \end z^j F^(z) = \sum_^\infty n^k f_n z^n \quad\text k \in \mathbb. A negative-order reversal of this sequence powers formula corresponding to the operation of repeated integration is defined by the zeta series transformation and its generalizations defined as a derivative-based transformation of generating functions, or alternately termwise by and performing an integral transformation on the sequence generating function. Related operations of performing
fractional integration In fractional calculus, an area of mathematical analysis, the differintegral (sometime also called the derivigral) is a combined differentiation/ integration operator. Applied to a function ƒ, the ''q''-differintegral of ''f'', here denoted ...
on a sequence generating function are discussed
here Here is an adverb that means "in, on, or at this place". It may also refer to: Software * Here Technologies, a mapping company * Here WeGo (formerly Here Maps), a mobile app and map website by Here Technologies, Here Television * Here TV (form ...
.


Enumerating arithmetic progressions of sequences

In this section we give formulas for generating functions enumerating the sequence given an ordinary generating function where , , and (see the main article on transformations). For , this is simply the familiar decomposition of a function into even and odd parts (i.e., even and odd powers): \begin \sum_^\infty f_ z^ &= \frac \\ px\sum_^\infty f_ z^ &= \frac. \end More generally, suppose that and that denotes the th
primitive root of unity In mathematics, a root of unity, occasionally called a de Moivre number, is any complex number that yields 1 when raised to some positive integer power . Roots of unity are used in many branches of mathematics, and are especially important in ...
. Then, as an application of the
discrete Fourier transform In mathematics, the discrete Fourier transform (DFT) converts a finite sequence of equally-spaced samples of a function into a same-length sequence of equally-spaced samples of the discrete-time Fourier transform (DTFT), which is a complex- ...
, we have the formula \sum_^\infty f_ z^ = \frac \sum_^ \omega_a^ F\left(\omega_a^m z\right). For integers , another useful formula providing somewhat ''reversed'' floored arithmetic progressions — effectively repeating each coefficient times — are generated by the identity \sum_^\infty f_ z^n = \frac F(z^m) = \left(1 + z + \cdots + z^ + z^\right) F(z^m).


-recursive sequences and holonomic generating functions


Definitions

A formal power series (or function) 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 are in the field of rational functions, . Equivalently, is holonomic if the vector space over 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, are polynomials in . Thus we can see an equivalent condition that a generating function is holonomic if its coefficients satisfy a -recurrence of the form \widehat_s(n) f_ + \widehat_(n) f_ + \cdots + \widehat_0(n) f_n = 0, for all large enough and where the are fixed finite-degree polynomials in . In other words, the properties that a sequence be ''-recursive'' and have a holonomic generating function are equivalent. Holonomic functions are closed under the Hadamard product operation on generating functions.


Examples

The functions , , , , , the
dilogarithm In mathematics, Spence's function, or dilogarithm, denoted as , is a particular case of the polylogarithm. Two related special functions are referred to as Spence's function, the dilogarithm itself: :\operatorname_2(z) = -\int_0^z\, du \textz ...
function , the
generalized hypergeometric function In mathematics, a generalized hypergeometric series is a power series in which the ratio of successive coefficients indexed by ''n'' is a rational function of ''n''. The series, if convergent, defines a generalized hypergeometric function, which ...
s and the functions defined by the power series \sum_^\infty \frac and the non-convergent \sum_^\infty n! \cdot z^n are all holonomic. Examples of -recursive sequences with holonomic generating functions include and , where sequences such as and are ''not'' -recursive due to the nature of singularities in their corresponding generating functions. Similarly, functions with infinitely many singularities such as , , and are ''not'' holonomic functions.


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

Tools for processing and working with -recursive sequences in ''
Mathematica Wolfram Mathematica is a software system with built-in libraries for several areas of technical computing that allow machine learning, statistics, symbolic computation, data manipulation, network analysis, time series analysis, NLP, optimizat ...
'' 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 ''-recurrences'' for arbitrary input sequences (useful for
experimental mathematics Experimental mathematics is an approach to mathematics in which computation is used to investigate mathematical objects and identify properties and patterns. It has been defined as "that branch of mathematics that concerns itself ultimately with th ...
and exploration) and the Sigma package which is able to find P-recurrences for many sums and solve for closed-form solutions to -recurrences involving generalized
harmonic number In mathematics, the -th harmonic number is the sum of the reciprocals of the first natural numbers: H_n= 1+\frac+\frac+\cdots+\frac =\sum_^n \frac. Starting from , the sequence of harmonic numbers begins: 1, \frac, \frac, \frac, \frac, \dot ...
s. Other packages listed on this particular RISC site are targeted at working with holonomic ''generating functions'' specifically.


Relation to discrete-time Fourier transform

When the series
converges absolutely In mathematics, an infinite series of numbers is said to converge absolutely (or to be absolutely convergent) if the sum of the absolute values of the summands is finite. More precisely, a real or complex series \textstyle\sum_^\infty a_n is said ...
, G \left ( a_n; e^ \right) = \sum_^\infty a_n e^ is the discrete-time Fourier transform of the sequence .


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 In mathematics, the radius of convergence of a power series is the radius of the largest disk at the center of the series in which the series converges. It is either a non-negative real number or \infty. When it is positive, the power series co ...
for the power series. The reverse can also hold; often the radius of convergence for a generating function can be used to deduce the
asymptotic growth In mathematics, an asymptotic expansion, asymptotic series or Poincaré expansion (after Henri Poincaré) is a formal series of functions which has the property that truncating the series after a finite number of terms provides an approximation ...
of the underlying sequence. For instance, if an ordinary generating function that has a finite radius of convergence of can be written as G(a_n; x) = \frac where each of and is a function that is analytic to a radius of convergence greater than (or is
entire Entire may refer to: * Entire function, a function that is holomorphic on the whole complex plane * Entire (animal), an indication that an animal is not neutered * Entire (botany) This glossary of botanical terms is a list of definitions of ...
), and where then a_n \sim \frac \, n^\left(\frac\right)^n \sim \frac \binom\left(\frac\right)^n = \frac \left(\!\!\binom\!\!\right)\left(\frac\right)^n\,, using the
Gamma function In mathematics, the gamma function (represented by , the capital letter gamma from the Greek alphabet) is one commonly used extension of the factorial function to complex numbers. The gamma function is defined for all complex numbers except ...
, a
binomial coefficient In mathematics, the binomial coefficients are the positive integers that occur as coefficients in the binomial theorem. Commonly, a binomial coefficient is indexed by a pair of integers and is written \tbinom. It is the coefficient of the t ...
, or a multiset coefficient. Often this approach can be iterated to generate several terms in an asymptotic series for . In particular, G\left(a_n - \frac \binom\left(\frac\right)^n; 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 , , , , and to describe the generating function, as above. Similar asymptotic analysis is possible for exponential generating functions; with an exponential generating function, it is 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

As derived above, the ordinary generating function for the sequence of squares is G(n^2; x) = \frac. With , , , , and , we can verify that the squares grow as expected, like the squares: a_n \sim \frac \, n^ \left (\frac \right)^n = \frac\,n^ \left(\frac1 1\right)^n = n^2.


Asymptotic growth of the Catalan numbers

The ordinary generating function for the
Catalan number In combinatorial mathematics, the Catalan numbers are a sequence of natural numbers that occur in various counting problems, often involving recursively defined objects. They are named after the French-Belgian mathematician EugĂšne Charles Cata ...
s is G(C_n; x) = \frac. With , , , , and , we can conclude that, for the Catalan numbers, C_n \sim \frac \, n^ \left(\frac \right)^n = \frac \, n^ \left(\frac\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 is the ordinary generating function for
binomial coefficients In mathematics, the binomial coefficients are the positive integers that occur as coefficients in the binomial theorem. Commonly, a binomial coefficient is indexed by a pair of integers and is written \tbinom. It is the coefficient of the t ...
for a fixed , one may ask for a bivariate generating function that generates the binomial coefficients for all and . To do this, consider itself as a sequence in , and find the generating function in that has these sequence values as coefficients. Since the generating function for is \frac, the generating function for the binomial coefficients is: \sum_ \binom x^k y^n = \frac=\frac.


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


Definitions

Expansions of (formal) ''Jacobi-type'' and ''Stieltjes-type''
continued fractions In mathematics, a continued fraction is an expression obtained through an iterative process of representing a number as the sum of its integer part and the reciprocal of another number, then writing this other number as the sum of its integer ...
(''-fractions'' and ''-fractions'', respectively) whose th rational convergents represent -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 (-fractions) are expanded as in the following equation and have the next corresponding power series expansions with respect to for some specific, application-dependent component sequences, and , where denotes the formal variable in the second power series expansion given below: \begin J^(z) & = \cfrac \\ px & = 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 , 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 , for , if , and where for all integers , 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 (though in practice when ), we can define the rational th convergents to the infinite -fraction, , expanded by \operatorname_h(z) := \frac = j_0 + j_1 z + \cdots + j_ z^ + \sum_^\infty \widetilde_ z^n component-wise through the sequences, and , 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 for all implies additional finite difference equations and congruence properties satisfied by the sequence of , ''and'' for if then we have the congruence j_n \equiv ^n\operatorname_h(z) \pmod h, for non-symbolic, determinate choices of the parameter sequences and when , that is, when these sequences do not implicitly depend on an auxiliary parameter such as , , or as in the examples contained in the table below.


Examples

The next table provides examples of closed-form formulas for the component sequences found computationally (and subsequently proved correct in the cited references) in several special cases of the prescribed sequences, , generated by the general expansions of the -fractions defined in the first subsection. Here we define and the parameters , and to be indeterminates with respect to these expansions, where the prescribed sequences enumerated by the expansions of these -fractions are defined in terms of the -Pochhammer symbol,
Pochhammer symbol In mathematics, the falling factorial (sometimes called the descending factorial, falling sequential product, or lower factorial) is defined as the polynomial :\begin (x)_n = x^\underline &= \overbrace^ \\ &= \prod_^n(x-k+1) = \prod_^(x-k) \,. \e ...
, and the
binomial coefficients In mathematics, the binomial coefficients are the positive integers that occur as coefficients in the binomial theorem. Commonly, a binomial coefficient is indexed by a pair of integers and is written \tbinom. It is the coefficient of the t ...
. : The radii of convergence of these series corresponding to the definition of the Jacobi-type -fractions given above are in general different from that of the corresponding power series expansions defining the ordinary generating functions of these sequences.


Examples

Generating functions for the sequence of
square number In mathematics, a square number or perfect square is an integer that is the square (algebra), square of an integer; in other words, it is the multiplication, product of some integer with itself. For example, 9 is a square number, since it equals ...
s 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 main article, we can show that for we have that \sum_^\infty \frac = \sum_^\infty \frac + \sum_^\infty \frac, where we have the special case identity for the generating function of the
divisor function In mathematics, and specifically in number theory, a divisor function is an arithmetic function related to the divisors of an integer. When referred to as ''the'' divisor function, it counts the ''number of divisors of an integer'' (including ...
, , given by \sum_^\infty \frac = \sum_^\infty \frac.


Bell series

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


Dirichlet series generating function

\operatorname\left(n^2;s\right)=\sum_^\infty \frac=\zeta(s-2), using the
Riemann zeta function The Riemann zeta function or Euler–Riemann zeta function, denoted by the Greek letter (zeta), is a mathematical function of a complex variable defined as \zeta(s) = \sum_^\infty \frac = \frac + \frac + \frac + \cdots for \operatorname(s) > ...
. The sequence generated by a
Dirichlet series In mathematics, a Dirichlet series is any series of the form \sum_^\infty \frac, where ''s'' is complex, and a_n is a complex sequence. It is a special case of general Dirichlet series. Dirichlet series play a variety of important roles in analyti ...
generating function (DGF) corresponding to: \operatorname(a_k;s)=\zeta(s)^m where is the
Riemann zeta function The Riemann zeta function or Euler–Riemann zeta function, denoted by the Greek letter (zeta), is a mathematical function of a complex variable defined as \zeta(s) = \sum_^\infty \frac = \frac + \frac + \frac + \cdots for \operatorname(s) > ...
, has the ordinary generating function: \sum_^ a_k x^k = x + \binom \sum_ x^ + \binom\underset x^ + \binom\underset x^ + \binom\underset x^ + \cdots


Multivariate generating functions

Multivariate generating functions arise in practice when calculating the number of
contingency tables In statistics, a contingency table (also known as a cross tabulation or crosstab) is a type of table in a matrix format that displays the (multivariate) frequency distribution of the variables. They are heavily used in survey research, business ...
of non-negative integers with specified row and column totals. Suppose the table has rows and columns; the row sums are and the column sums are . Then, according to
I. J. Good Irving John Good (9 December 1916 – 5 April 2009)The Times of 16-apr-09, http://www.timesonline.co.uk/tol/comment/obituaries/article6100314.ece was a British mathematician who worked as a cryptologist at Bletchley Park with Alan Turing. Afte ...
, the number of such tables is the coefficient of x_1^\cdots x_r^y_1^\cdots 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 In mathematics, the binomial coefficients are the positive integers that occur as coefficients in the binomial theorem. Commonly, a binomial coefficient is indexed by a pair of integers and is written \tbinom. It is the coefficient of the t ...
, the
Stirling numbers In mathematics, Stirling numbers arise in a variety of analytic and combinatorial problems. They are named after James Stirling, who introduced them in a purely algebraic setting in his book ''Methodus differentialis'' (1730). They were rediscove ...
, and the
Eulerian numbers In combinatorics, the Eulerian number ''A''(''n'', ''m'') is the number of permutations of the numbers 1 to ''n'' in which exactly ''m'' elements are greater than the previous element (permutations with ''m'' "ascents"). They are the coefficien ...
: \begin e^ & = \sum_ \binom w^m \frac \\ pxe^ & = \sum_ \begin n \\ m \end w^m \frac \\ px\frac & = \sum_ \begin n \\ m \end w^m \frac \\ px\frac & = \sum_ \left\langle\begin n \\ m \end \right\rangle w^m \frac \\ px\frac &= \sum_ \left\langle\begin m+n+1 \\ m \end \right\rangle \frac. \end


Applications


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


Example 1: A formula for sums of harmonic numbers

Generating functions give us several methods to manipulate sums and to establish identities between sums. The simplest case occurs when . We then know that for the corresponding ordinary generating functions. For example, we can manipulate s_n=\sum_^ H_\,, where are the
harmonic number In mathematics, the -th harmonic number is the sum of the reciprocals of the first natural numbers: H_n= 1+\frac+\frac+\cdots+\frac =\sum_^n \frac. Starting from , the sequence of harmonic numbers begins: 1, \frac, \frac, \frac, \frac, \dot ...
s. Let H(z) = \sum_^\infty be the ordinary generating function of the harmonic numbers. Then H(z) = \frac\sum_^\infty \frac\,, and thus S(z) = \sum_^\infty = \frac\sum_^\infty \frac\,. Using \frac = \sum_^\infty (n+1)z^n\,,
convolution In mathematics (in particular, functional analysis), convolution is a operation (mathematics), mathematical operation on two function (mathematics), functions ( and ) that produces a third function (f*g) that expresses how the shape of one is ...
with the numerator yields s_n = \sum_^ \frac = (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 we define the two sequences of sums \begin s_n &:= \sum_^n \binom f_m 3^ \\ px\tilde_n &:= \sum_^n \binom (m+1)(m+2)(m+3) f_m 3^\,, \end for all , 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 In combinatorics, the binomial transform is a sequence transformation (i.e., a transform of a sequence) that computes its forward differences. It is closely related to the Euler transform, which is the result of applying the binomial transform to t ...
to write the generating function for the first sum as S(z) = \frac F\left(\frac\right). Since the generating function for the sequence 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 \tilde(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 , , , and , where . Finally, it follows that we may express the second sums through the first sums in the following form: \begin \tilde_n & = ^nleft(6(1-3z)^3 \sum_^\infty s_n z^n + 18 (1-3z)^3 \sum_^\infty n s_n z^n + 9 (1-3z)^3 \sum_^\infty n(n-1) s_n z^n + (1-3z)^3 \sum_^\infty n(n-1)(n-2) s_n z^n\right) \\ px & = (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 reformulate 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 ) to tile a 3-by- rectangle with unmarked 2-by-1 domino pieces. Let the auxiliary sequence, , be defined as the number of ways to cover a 3-by- rectangle-minus-corner section of the full rectangle. We seek to use these definitions to give a closed form formula for 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 \begin U(z) = 1 + 3z^2 + 11 z^4 + 41 z^6 + \cdots, \\ V(z) = z + 4z^3 + 15 z^5 + 56 z^7 + \cdots. \end If we consider the possible configurations that can be given starting from the left edge of the 3-by- rectangle, we are able to express the following mutually dependent, or ''mutually recursive'', recurrence relations for our two sequences when defined as above where , , , and : \begin U_n & = 2 V_ + U_ \\ V_n & = U_ + V_. \end Since we have that for all integers , the index-shifted generating functions satisfy z^m G(z) = \sum_^\infty g_ 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 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 and that U_ = \left\lceil \frac \right\rceil\,, for all integers . We also note that the same shifted generating function technique applied to the second-order
recurrence Recurrence and recurrent may refer to: *''Disease recurrence'', also called relapse *''Eternal recurrence'', or eternal return, the concept that the universe has been recurring, and will continue to recur, in a self-similar form an infinite number ...
for the
Fibonacci numbers In mathematics, the Fibonacci numbers, commonly denoted , form a sequence, the Fibonacci sequence, in which each number is the sum of the two preceding ones. The sequence commonly starts from 0 and 1, although some authors start the sequence from ...
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 In mathematics, a rational function is any function that can be defined by a rational fraction, which is an algebraic fraction such that both the numerator and the denominator are polynomials. The coefficients of the polynomials need not be rati ...
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 In mathematics, more specifically in mathematical analysis, the Cauchy product is the discrete convolution of two infinite series. It is named after the French mathematician Augustin-Louis Cauchy. Definitions The Cauchy product may apply to infini ...
). #Consider and are ordinary generating functions. C(z) = A(z)B(z) \Leftrightarrow ^n(z) = \sum_^ #Consider and are exponential generating functions. C(z) = A(z)B(z) \Leftrightarrow \left frac\right(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 ^n(z) = \sum_ f_j g_k h_ l #Consider the -fold convolution of a sequence with itself for some positive integer (see the example below for an application) C(z) = G(z)^m \Leftrightarrow ^n(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 In probability theory, the probability generating function of a discrete random variable is a power series representation (the generating function) of the probability mass function of the random variable. Probability generating functions are often ...
, or ''pgf'', of a random variable is denoted by , then we can show that for any two random variables G_(z) = G_X(z) G_Y(z)\,, if and are independent. Similarly, the number of ways to pay 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 cents to be paid in coins of any positive integer denomination, we arrive at the generating for the number of such combinations of change being generated by the partition function generating function expanded by the infinite -Pochhammer symbol product of \prod_^\infty \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 In combinatorics, combinatorial mathematics, the Catalan numbers are a sequence of natural numbers that occur in various Enumeration, counting problems, often involving recursion, recursively defined objects. They are named after the French-Belg ...
, . In particular, this sequence has the combinatorial interpretation as being the number of ways to insert parentheses into the product so that the order of multiplication is completely specified. For example, which corresponds to the two expressions and . 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_\,,\quad n \geq 0\,, and so has a corresponding convolved generating function, , satisfying C(z) = z \cdot C(z)^2 + 1\,. Since , we then arrive at a formula for this generating function given by C(z) = \frac = \sum_^\infty \frac\binom z^n\,. Note that the first equation implicitly defining above implies that C(z) = \frac \,, which then leads to another "simple" (of form) continued fraction expansion of this generating function.


Example: Spanning trees of fans and convolutions of convolutions

A ''fan of order '' is defined to be a graph on the vertices with edges connected according to the following rules: Vertex 0 is connected by a single edge to each of the other vertices, and vertex k is connected by a single edge to the next vertex for all . There is one fan of order one, three fans of order two, eight fans of order three, and so on. A
spanning tree In the mathematical field of graph theory, a spanning tree ''T'' of an undirected graph ''G'' is a subgraph that is a tree which includes all of the vertices of ''G''. In general, a graph may have several spanning trees, but a graph that is not ...
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 of a fan of order are possible for each . As an observation, we may approach the question by counting the number of ways to join adjacent sets of vertices. For example, when , we have that , which is a sum over the -fold convolutions of the sequence for . 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 F(z) = G(z) + G(z)^2 + G(z)^3 + \cdots = \frac = \frac = \frac\,, from which we are able to extract an exact formula for the sequence by taking the
partial fraction expansion In algebra, the partial fraction decomposition or partial fraction expansion of a rational fraction (that is, a fraction such that the numerator and the denominator are both polynomials) is an operation that consists of expressing the fraction as ...
of the last generating function.


Implicit generating functions and the Lagrange inversion formula


Introducing a free parameter (snake oil method)

Sometimes the sum 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 as limit in the summation. When n does not appear explicitly in the summation, we may consider as a “free” parameter and treat as a coefficient of , change the order of the summations on and , and try to compute the inner sum. For example, if we want to compute s_n = \sum_^\infty\,, \quad m,n \in \mathbb_0\,, we can treat as a "free" parameter, and set F(z) = \sum_^\inftyz^n\,. Interchanging summation (“snake oil”) gives F(z) = \sum_^\infty\sum_^\infty\,. Now the inner sum is . Thus \begin F(z) &= \frac\sum_^\infty \\ px&= \frac\sum_^\infty &\text C_k = k\text \\ px&= \frac\frac \\ px&= \frac\left(1-\frac\right) \\ px&= \frac = z\frac\,. \end Then we obtain s_n = \begin \displaystyle\binom & \text m \geq 1 \,, \\ = 0& \text m = 0\,. \end It is instructive to use the same method again for the sum, but this time take as the free parameter instead of . We thus set G(z) = \sum_^\infty\left( \sum_^\infty \binom\binom\frac \right) z^m\,. Interchanging summation ("snake oil") gives G(z) = \sum_^\infty \binom\frac z^ \sum_^\infty \binom z^\,. Now the inner sum is . Thus \begin G(z) &= (1+z)^n \sum_^\infty \frac\binom\left(\frac\right)^k \\ px&= (1+z)^n \sum_^\infty C_k \,\left(\frac\right)^k &\text C_k = k\text \\ px&= (1+z)^n \,\frac \\ px&= (1+z)^n \,\frac \\ px&= (1+z)^n \,\frac \\ px&= (1+z)^n \,\frac = z(1+z)^\,. \end Thus we obtain s_n = \left ^m\rightz(1+z)^ = \left ^\right(1+z)^ = \binom\,, for as before.


Generating functions prove congruences

We say that two generating functions (power series) are congruent modulo , written if their coefficients are congruent modulo for all , i.e., for all relevant cases of the integers (note that we need not assume that is an integer here—it may very well be polynomial-valued in some indeterminate , for example). If the "simpler" right-hand-side generating function, , is a rational function of , then the form of this sequence suggests that the sequence is eventually periodic modulo fixed particular cases of integer-valued . For example, we can prove that the
Euler numbers In mathematics, the Euler numbers are a sequence ''En'' of integers defined by the Taylor series expansion :\frac = \frac = \sum_^\infty \frac \cdot t^n, where \cosh (t) is the hyperbolic cosine function. The Euler numbers are related to a ...
, \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_^\infty 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 ) is given in the section on continued fraction representations of (even non-convergent) ordinary generating functions by -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: 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 In mathematics, especially in combinatorics, Stirling numbers of the first kind arise in the study of permutations. In particular, the Stirling numbers of the first kind count permutations according to their number of cycles (counting fixed poin ...
and for the partition function which show the versatility of generating functions in tackling problems involving
integer sequences In mathematics, an integer sequence is a sequence (i.e., an ordered list) of integers. An integer sequence may be specified ''explicitly'' by giving a formula for its ''n''th term, or ''implicitly'' by giving a relationship between its terms. For ...
.


The Stirling numbers modulo small integers

The main article on the Stirling numbers generated by the finite products S_n(x) := \sum_^n \begin n \\ k \end 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 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+1)\cdot (x+1)\cdots = x^ (x+1)^\,, which implies that the parity of these
Stirling numbers In mathematics, Stirling numbers arise in a variety of analytic and combinatorial problems. They are named after James Stirling, who introduced them in a purely algebraic setting in his book ''Methodus differentialis'' (1730). They were rediscove ...
matches that of the binomial coefficient \begin n \\ k \end \equiv \binom \pmod\,, and consequently shows that is even whenever . 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 \begin n \\ m \end & \equiv ^m\left( x^ (x+1)^ (x+2)^ \right) && \pmod \\ & \equiv \sum_^ \begin \left\lceil \frac \right\rceil \\ k \end \begin \left\lfloor \frac \right\rfloor \\ m-k - \left\lceil \frac \right\rceil \end \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 is generated by the reciprocal infinite -Pochhammer symbol product (or -Pochhammer product as the case may be) given by \begin \sum_^\infty p(n) z^n & = \frac \\ pt& = 1 + z + 2z^2 + 3 z^3 + 5z^4 + 7z^5 + 11z^6 + \cdots. \end This partition function satisfies many known congruence properties, which notably include the following results though there are still many open questions about the forms of related integer congruences for the function: \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 in the binomial coefficient generating function \frac = \sum_^\infty \binomz^i\,, all of the coefficients are divisible by 5 except for those which correspond to the powers and moreover in those cases the remainder of the coefficient is 1 modulo 5. Thus, \frac \equiv \frac \pmod\,, or equivalently \frac \equiv 1 \pmod\,. It follows that \frac \equiv 1 \pmod\,. Using the infinite product expansions of z \cdot \frac = z \cdot \left((1-z)\left(1-z^2\right) \cdots \right)^4 \times \frac\,, it can be shown that the coefficient of in is divisible by 5 for all . Finally, since \begin \sum_^\infty p(n-1) z^n & = \frac \\ px& = z \cdot \frac \times \left(1+z^5+z^+\cdots\right)\left(1+z^+z^+\cdots\right) \cdots \end we may equate the coefficients of in the previous equations to prove our desired congruence result, namely that for all .


Transformations of generating functions

There are a number of transformations of generating functions that provide other applications (see the main article). A transformation of a sequence's ''ordinary generating function'' (OGF) provides a method of converting the generating function for one sequence into a generating function enumerating another. These transformations typically involve integral formulas involving a sequence OGF (see integral transformations) or weighted sums over the higher-order derivatives of these functions (see derivative transformations). Generating function transformations can come into play when we seek to express a generating function for the sums s_n := \sum_^n \binom C_ a_m, in the form of involving the original sequence generating function. For example, if the sums are s_n := \sum_^\infty \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 In combinatorics, the binomial transform is a sequence transformation (i.e., a transform of a sequence) that computes its forward differences. It is closely related to the Euler transform, which is the result of applying the binomial transform to t ...
and the
Stirling transform In combinatorial mathematics, the Stirling transform of a sequence of numbers is the sequence given by :b_n=\sum_^n \left\ a_k, where \left\ is the Stirling number of the second kind, also denoted ''S''(''n'',''k'') (with a capital ''S''), which ...
). There are also integral formulas for converting between a sequence's OGF, , and its exponential generating function, or EGF, , and vice versa given by \begin F(z) &= \int_0^\infty \hat(tz) e^ \, dt \,, \\ px\hat(z) &= \frac \int_^\pi F\left(z e^\right) e^ \, d\vartheta \,, \end provided that these integrals converge for appropriate values of .


Other applications

Generating functions are used to: * Find a
closed formula In mathematics, a closed-form expression is a mathematical expression that uses a finite number of standard operations. It may contain constants, variables, certain well-known operations (e.g., + − × Ă·), and functions (e.g., ''n''th ro ...
for a sequence given in a recurrence relation. For example, consider
Fibonacci numbers In mathematics, the Fibonacci numbers, commonly denoted , form a sequence, the Fibonacci sequence, in which each number is the sum of the two preceding ones. The sequence commonly starts from 0 and 1, although some authors start the sequence from ...
. * Find
recurrence relation In mathematics, a recurrence relation is an equation according to which the nth term of a sequence of numbers is equal to some combination of the previous terms. Often, only k previous terms of the sequence appear in the equation, for a parameter ...
s 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 An enumeration is a complete, ordered listing of all the items in a collection. The term is commonly used in mathematics and computer science to refer to a listing of all of the elements of a set. The precise requirements for an enumeration (fo ...
problems in
combinatorics Combinatorics is an area of mathematics primarily concerned with counting, both as a means and an end in obtaining results, and certain properties of finite structures. It is closely related to many other areas of mathematics and has many appl ...
and encoding their solutions.
Rook polynomial In combinatorial mathematics, a rook polynomial is a generating polynomial of the number of ways to place non-attacking rooks on a board that looks like a checkerboard; that is, no two rooks may be in the same row or column. The board is any sub ...
s are an example of an application in combinatorics. * Evaluate infinite sums.


Other generating functions


Examples

Examples of polynomial sequences generated by more complex generating functions include: *
Appell polynomials In mathematics, an Appell sequence, named after Paul Émile Appell, is any polynomial sequence \_ satisfying the identity :\frac p_n(x) = np_(x), and in which p_0(x) is a non-zero constant. Among the most notable Appell sequences besides the t ...
*
Chebyshev polynomials The Chebyshev polynomials are two sequences of polynomials related to the cosine and sine functions, notated as T_n(x) and U_n(x). They can be defined in several equivalent ways, one of which starts with trigonometric functions: The Chebyshe ...
*
Difference polynomials In mathematics, in the area of complex analysis, the general difference polynomials are a polynomial sequence, a certain subclass of the Sheffer polynomials, which include the Newton polynomials, Selberg's polynomials, and the Stirling interpolati ...
*
Generalized Appell polynomials In mathematics, a polynomial sequence \ has a generalized Appell representation if the generating function for the polynomials takes on a certain form: :K(z,w) = A(w)\Psi(zg(w)) = \sum_^\infty p_n(z) w^n where the generating function or kernel K( ...
* -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 and diagonal generating functions, and their corresponding 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\bigl(x \log F(z)\bigr) = \sum_^\infty f_n(x) z^n, for some analytic function with a power series expansion such that . We say that a family of polynomials, , forms a ''convolution family'' if and if the following convolution condition holds for all , and for all : 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 is of
binomial type In mathematics, a polynomial sequence, i.e., a sequence of polynomials indexed by non-negative integers \left\ in which the index of each polynomial equals its degree, is said to be of binomial type if it satisfies the sequence of identities :p_ ...
* Special values of the sequence include and , and * For arbitrary (fixed) , 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 , we have modified generating functions for these convolution polynomial sequences given by \frac = \left ^n\right\mathcal_t(z)^x, where is implicitly defined by a
functional equation In mathematics, a functional equation is, in the broadest meaning, an equation in which one or several functions appear as unknowns. So, differential equations and integral equations are functional equations. However, a more restricted meaning ...
of the form . Moreover, we can use matrix methods (as in the reference) to prove that given two convolution polynomial sequences, and , with respective corresponding generating functions, and , then for arbitrary we have the identity \left ^n\right\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'', , so-termed ''tree polynomials'', the
Bell numbers In combinatorial mathematics, the Bell numbers count the possible partitions of a set. These numbers have been studied by mathematicians since the 19th century, and their roots go back to medieval Japan. In an example of Stigler's law of eponymy ...
, , the
Laguerre polynomials In mathematics, the Laguerre polynomials, named after Edmond Laguerre (1834–1886), are solutions of Laguerre's equation: xy'' + (1 - x)y' + ny = 0 which is a second-order linear differential equation. This equation has nonsingular solutions on ...
, and the Stirling convolution polynomials.


Tables of special generating functions

An initial listing of special mathematical series is found
here Here is an adverb that means "in, on, or at this place". It may also refer to: Software * Here Technologies, a mapping company * Here WeGo (formerly Here Maps), a mobile app and map website by Here Technologies, Here Television * Here TV (form ...
. 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 :


History

George PĂłlya George PĂłlya (; hu, PĂłlya György, ; December 13, 1887 – September 7, 1985) was a Hungarian mathematician. He was a professor of mathematics from 1914 to 1940 at ETH ZĂŒrich and from 1940 to 1953 at Stanford University. He made fundamental ...
writes in '' Mathematics and plausible reasoning'':
''The name "generating function" is due to Laplace. Yet, without giving it a name,
Euler Leonhard Euler ( , ; 15 April 170718 September 1783) was a Swiss mathematician, physicist, astronomer, geographer, logician and engineer who founded the studies of graph theory and topology and made pioneering and influential discoveries in ma ...
used the device of generating functions long before Laplace . He applied this mathematical tool to several problems in Combinatory Analysis and the
Theory of Numbers Number theory (or arithmetic or higher arithmetic in older usage) is a branch of pure mathematics devoted primarily to the study of the integers and integer-valued functions. German mathematician Carl Friedrich Gauss (1777–1855) said, "Mathe ...
.''


See also

*
Moment-generating function In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compare ...
*
Probability-generating function In probability theory, the probability generating function of a discrete random variable is a power series representation (the generating function) of the probability mass function of the random variable. Probability generating functions are oft ...
*
Generating function transformation In mathematics, a transformation of a sequence's generating function provides a method of converting the generating function for one sequence into a generating function enumerating another. These transformations typically involve integral formula ...
*
Stanley's reciprocity theorem In combinatorial mathematics, Stanley's reciprocity theorem, named after MIT mathematician Richard P. Stanley, states that a certain functional equation is satisfied by the generating function of any rational cone (defined below) and the generatin ...
* Applications to
Partition (number theory) In number theory and combinatorics, a partition of a positive integer , also called an integer partition, is a way of writing as a sum of positive integers. Two sums that differ only in the order of their summands are considered the same parti ...
*
Combinatorial principles In proving results in combinatorics several useful combinatorial rules or combinatorial principles are commonly recognized and used. The rule of sum, rule of product, and inclusion–exclusion principle are often used for enumerative purposes. B ...
*
Cyclic sieving In combinatorial mathematics, cyclic sieving is a phenomenon by which evaluating a generating function for a finite set at roots of unity counts symmetry classes of objects acted on by a cyclic group. Definition Let ''C'' be a cyclic group gene ...
*
Z-transform In mathematics and signal processing, the Z-transform converts a discrete-time signal, which is a sequence of real or complex numbers, into a complex frequency-domain (z-domain or z-plane) representation. It can be considered as a discrete-tim ...
*
Umbral calculus In mathematics before the 1970s, the term umbral calculus referred to the surprising similarity between seemingly unrelated polynomial equations and certain "shadowy" techniques used to "prove" them. These techniques were introduced by John Blis ...


Notes


References


Citations

* * 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 Alexander Bogomolny (January 4, 1948 July 7, 2018) was a Soviet-born Israeli-American mathematician. He was Professor Emeritus of Mathematics at the University of Iowa, and formerly research fellow at the Moscow Institute of Electronics and Math ...

"Generating Functions"
by
Ed Pegg Jr. Edward Taylor Pegg Jr. (born December 7, 1963) is an expert on mathematical puzzles and is a self-described recreational mathematician. He wrote an online puzzle column called Ed Pegg Jr.'s ''Math Games'' for the Mathematical Association of Amer ...
,
Wolfram Demonstrations Project The Wolfram Demonstrations Project is an organized, open-source collection of small (or medium-size) interactive programs called Demonstrations, which are meant to visually and interactively represent ideas from a range of fields. It is hos ...
, 2007. {{DEFAULTSORT:Generating Function