In _{''n''}) by treating them as the

Generatingfunctionology

' (1994)

_{''n''} is
:$G(a\_n;x)=\backslash sum\_^\backslash 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 _{''m, n''} (where ''n'' and ''m'' are natural numbers) is
:$G(a\_;x,y)=\backslash sum\_^\backslash infty\; a\_x^my^n.$

_{''n''} is
:$\backslash operatorname(a\_n;x)=\backslash sum\; \_^\backslash infty\; a\_n\; \backslash frac.$
Exponential generating functions are generally more convenient than ordinary generating functions for

_{''n''} is
:$\backslash operatorname(a\_n;x)=\backslash sum\; \_^\backslash infty\; a\_n\; e^\; \backslash frac\; =\; e^\backslash ,\; \backslash operatorname(a\_n;x).$

_{''n''} is
:$\backslash operatorname(a\_n;x)=\backslash sum\; \_^\backslash infty\; a\_n\; \backslash frac.$
The Lambert series coefficients in the power series expansions $b\_n\; :=;\; href="/html/ALL/s/^n.html"\; ;"title="^n">^n$ for integers $n\; \backslash geq\; 1$ are related by the

_{''n''} is an expression in terms of both an indeterminate ''x'' and a prime ''p'' and is given by
:$\backslash operatorname\_p(a\_n;x)=\backslash sum\_^\backslash infty\; a\_x^n.$

_{''n''} is
:$\backslash operatorname(a\_n;s)=\backslash sum\; \_^\backslash infty\; \backslash frac.$
The Dirichlet series generating function is especially useful when ''a''_{''n''} is a _{''n''} is a

_{''n''}(''x'') is a sequence of polynomials and ''f''(''t'') is a function of a certain form.

^{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'':
:$\backslash sum\_^\backslash infty(ax)^n=\; \backslash 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,
:$\backslash sum\_^\backslash infty(-1)^nx^n=\; \backslash 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
:$\backslash sum\_^\backslash infty\; x^=\backslash 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
:$\backslash sum\_^\backslash infty(n+1)x^n=\; \backslash frac,$
and the third power has as coefficients the triangular numbers 1, 3, 6, 10, 15, 21, ... whose term ''n'' is the binomial coefficient $\backslash tbinom2$, so that
:$\backslash sum\_^\backslash infty\backslash binom2\; x^n=\; \backslash frac.$
More generally, for any non-negative integer ''k'' and non-zero real value ''a'', it is true that
:$\backslash sum\_^\backslash infty\; a^n\backslash binomk\; x^n=\; \backslash frac\backslash ,.$
Since
:$2\backslash binom2\; -\; 3\backslash binom1\; +\; \backslash binom0\; =\; 2\backslash 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)\; =\; \backslash sum\_^\backslash infty\; n^2x^n\; =\; \backslash frac\; -\; \backslash frac\; +\; \backslash frac\; =\; \backslash 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:
:$\backslash begin\; G(n^2;x)\; \&\; =\backslash sum\_^\backslash infty\; n^2x^n\; =\; \backslash sum\_^\backslash infty\; n(n-1)\; x^n\; +\; \backslash sum\_^\backslash infty\; n\; x^n\; \backslash \backslash \; \&\; =\; x^2\; D^2\backslash left[\backslash frac\backslash right]\; +\; x\; D\backslash left[\backslash frac\backslash right]\; \backslash \backslash \; \&\; =\; \backslash frac\; +\; \backslash frac\; =\backslash frac.\; \backslash end$
By induction, we can similarly show for positive integers $m\; \backslash geq\; 1$ that
:$n^m\; =\; \backslash sum\_^m\; \backslash left\backslash \; \backslash frac,$
where $\backslash left\backslash $ denote the Stirling numbers of the second kind and where the generating function $\backslash sum\_\; n!\; /\; (n-j)!\; \backslash ,\; z^n\; =\; j!\; \backslash 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 $\backslash frac\; =\; \backslash sum\_^k\; \backslash binom\; \backslash frac$, we can apply a well-known finite sum identity involving the Stirling numbers to obtain that
:$\backslash sum\_\; n^m\; z^n\; =\; \backslash sum\_^\; \backslash left\backslash \; \backslash frac.$

_{n}''; ''x'') has the generating function
:$G(a\_n;\; x)\; \backslash cdot\; \backslash 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.

^{th} falling factorial:
:$z^k\; G^(z)\; =\; \backslash sum\_\; n^\; g\_n\; z^n\; =\; \backslash sum\_\; n\; (n-1)\; \backslash dotsb\; (n-k+1)\; g\_n\; z^n\; \backslash text\; k\; \backslash in\; \backslash 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):
:$\backslash sum\_^k\; \backslash left\backslash \; z^j\; F^(z)\; =\; \backslash sum\_\; n^k\; f\_n\; z^n\; \backslash text\; k\; \backslash in\; \backslash 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.

^{th} root of unity, primitive root of unity. Then, as an application of the discrete Fourier transform, we have the formula
:$\backslash sum\_\; f\_\; z^\; =\; \backslash frac\; \backslash sum\_^\; \backslash omega\_a^\; F\backslash left(\backslash omega\_a^\; z\backslash right).$
For integers $m\; \backslash geq\; 1$, another useful formula providing somewhat ''reversed'' floored arithmetic progressions — effectively repeating each coefficient $m$ times — are generated by the identity
:$\backslash sum\_\; f\_\; z^n\; =\; \backslash frac\; F(z^m)\; =\; \backslash left(1\; +\; z\; +\; \backslash cdots\; +\; z^\; +\; z^\backslash right)\; F(z^m).$

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.'')

_{0}, ''a''_{1}, ….

_{''n''}; ''x'') that has a finite radius of convergence of ''r'' can be written as
:$G(a\_n;\; x)\; =\; \backslash 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\; \backslash sim\; \backslash frac\; \backslash ,\; n^(1/r)^\; \backslash sim\; \backslash frac\; \backslash binom(1/r)^\; =\; \backslash frac\; \backslash left(\backslash !\backslash !\backslash binom\backslash !\backslash !\backslash right)(1/r)^\backslash ,,$
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\backslash left(a\_n\; -\; \backslash frac\; \backslash binom(1/r)^;\; x\; \backslash right)\; =\; G(a\_n;\; x)\; -\; \backslash frac\; \backslash left(1\; -\; \backslash frac\backslash right)^\backslash ,.$
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.

_{''n''} = ''n''^{2} are:

_{k}'' generated by a Dirichlet series generating function (DGF) corresponding to:
:$\backslash operatorname(a\_k;s)=\backslash zeta(s)^m$
where $\backslash zeta(s)$ is the

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

"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,

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''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 ...

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.
Definitions

: ''A generating function is a device somewhat similar to a bag. Instead of carrying many little objects detachedly, which could be embarrassing, we put them all in a bag, and then we have only one object to carry, the bag.'' :—George 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 ...

, Generatingfunctionology

' (1994)

Ordinary generating function (OGF)

The ''ordinary generating function'' of a sequence ''a''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''Exponential generating function (EGF)

The ''exponential generating function'' of a sequence ''a''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''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''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\; =\; \backslash 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 ...

in 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 ...

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

TheBell 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''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''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
:$\backslash operatorname(a\_n;s)=\backslash prod\_\; \backslash operatorname\_p(a\_n;p^)\backslash ,.$
If ''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 $;\; href="/html/ALL/s/^n.html"\; ;"title="^n">^n$ if and only if $\backslash operatorname(a\_n;s)\; \backslash zeta(s)\; =\; \backslash operatorname(b\_n;s)$ where $\backslash 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 = ...

.
Polynomial sequence generating functions

The idea of generating functions can be extended to sequences of other objects. Thus, for example, polynomial sequences ofbinomial 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^=\backslash sum\_^\backslash infty\; \backslash frac\; t^n$
where ''p''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 :$\backslash sum\_^\backslash infty\; x^n=\; \backslash 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''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)\; \backslash rho\_1^n\; +\; \backslash cdots\; +\; p\_(n)\; \backslash rho\_^n,$ where the reciprocal roots, $\backslash rho\_i\; \backslash in\; \backslash mathbb$, are fixed scalars and where $p\_i(n)$ is a polynomial in $n$ for all $1\; \backslash leq\; i\; \backslash leq\; \backslash 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)\; :=\; \backslash sum\_\; f(m,\; n)\; w^m\; z^n$ is a bivariate rational generating function, then its corresponding ''diagonal generating function'', $\backslash operatorname(F)\; :=\; \backslash sum\_\; f(n,\; n)\; z^n$, is ''algebraic''. For example, if we let :$F(s,\; t)\; :=\; \backslash sum\_\; \backslash binom\; s^i\; t^j\; =\; \backslash frac,$ then this generating function's diagonal coefficient generating function is given by the well-known OGF formula :$\backslash operatorname(F)\; =\; \backslash sum\_\; \backslash binom\; z^n\; =\; \backslash 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 offormal 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,\; \backslash ldots)$ of a sequence with ordinary generating function ''G''(''aShifting sequence indices

For integers $m\; \backslash geq\; 1$, we have the following two analogous identities for the modified generating functions enumerating the shifted sequence variants of $\backslash langle\; g\_\; \backslash rangle$ and $\backslash langle\; g\_\; \backslash rangle$, respectively: :$\backslash begin\; z^m\; G(z)\; \&\; =\; \backslash sum\_\; g\_\; z^n\; \backslash \backslash \; \backslash frac\; \&\; =\; \backslash sum\_\; g\_\; z^n.\; \backslash 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: :$\backslash begin\; G^\backslash prime(z)\; \&\; =\; \backslash sum\_\; (n+1)\; g\_\; z^n\; \backslash \backslash \; z\; \backslash cdot\; G^(z)\; \&\; =\; \backslash sum\_\; n\; g\_\; z^n\; \backslash \backslash \; \backslash int\_0^z\; G(t)\; \backslash ,\; dt\; \&\; =\; \backslash sum\_\; \backslash frac\; z^n.\; \backslash 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 $k$Enumerating arithmetic progressions of sequences

In this section we give formulas for generating functions enumerating the sequence $\backslash $ given an ordinary generating function $F(z)$ where $a,\; b\; \backslash in\; \backslash mathbb$, $a\; \backslash geq\; 2$, and $0\; \backslash 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): :$\backslash sum\_\; f\_\; z^\; =\; \backslash frac\backslash left(F(z)\; +\; F(-z)\backslash right)$ :$\backslash sum\_\; f\_\; z^\; =\; \backslash frac\backslash left(F(z)\; -\; F(-z)\backslash right).$ More generally, suppose that $a\; \backslash geq\; 3$ and that $\backslash omega\_a\; =\; \backslash exp\backslash left(\; 2\backslash pi\backslash imath\; /\; a\; \backslash right)$ denotes the $a$P-recursive sequences and holonomic generating functions

Definitions

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)\; +\; \backslash cdots\; +\; c\_r(z)\; F(z)\; =\; 0,$ where the coefficients $c\_i(z)$ are in the field of rational functions, $\backslash mathbb(z)$. Equivalently, $F(z)$ is holonomic if the vector space over $\backslash 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 :$\backslash widehat\_s(n)\; f\_\; +\; \backslash widehat\_(n)\; f\_\; +\; \backslash cdots\; +\; \backslash widehat\_0(n)\; f\_n\; =\; 0,$ for all large enough $n\; \backslash geq\; n\_0$ and where the $\backslash 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 $\backslash odot$ on generating functions.Examples

The functions $e^z$, $\backslash log(z)$, $\backslash cos(z)$, $\backslash arcsin(z)$, $\backslash sqrt$, the dilogarithm function $\backslash operatorname\_2(z)$, the generalized hypergeometric functions $\_pF\_q(...;...;z)$ and the functions defined by the power series $\backslash sum\_\; z^n\; /\; (n!)^2$ and the non-convergent $\backslash sum\_\; n!\; \backslash cdot\; z^n$ are all holonomic. Examples of P-recursive sequences with holonomic generating functions include $f\_n\; :=\; \backslash frac\; \backslash binom$ and $f\_n\; :=\; 2^n\; /\; (n^2+1)$, where sequences such as $\backslash sqrt$ and $\backslash 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 $\backslash tan(z)$, $\backslash sec(z)$, and $\backslash 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 thRISC 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\; \backslash left\; (\; a\_n;\; e^\; \backslash right)\; =\; \backslash sum\_^\backslash infty\; a\_n\; e^$ is the discrete-time Fourier transform of the sequence ''a''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''Asymptotic growth of the sequence of squares

As derived above, the ordinary generating function for the sequence of squares is :$\backslash 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\; \backslash sim\; \backslash frac\; \backslash ,\; n^\; \backslash left\; (\backslash frac\; \backslash right\; )^\; =\; \backslash frac\backslash ,n^\; (1/1)^n\; =\; n^2.$Asymptotic growth of the Catalan numbers

The ordinary generating function for the Catalan numbers is :$\backslash 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\; \backslash sim\; \backslash frac\; \backslash ,\; n^\; \backslash left(\backslash frac1r\; \backslash right)^n\; =\; \backslash frac\; \backslash ,\; n^\; \backslash left(\backslash frac1\backslash right)^n\; =\; \backslash 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 $\backslash 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 :$\backslash frac,$ the generating function for the binomial coefficients is: :$\backslash sum\_\; \backslash binom\; x^k\; y^n\; =\; \backslash frac=\backslash frac.$Representation by continued fractions (Jacobi-type J-fractions)

Definitions

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, $\backslash $ and $\backslash $, where $z\; \backslash neq\; 0$ denotes the formal variable in the second power series expansion given below: :$\backslash begin\; J^(z)\; \&\; =\; \backslash cfrac\; \backslash \backslash \; \&\; =\; 1\; +\; c\_1\; z\; +\; \backslash left(\backslash text\_2+c\_1^2\backslash right)\; z^2\; +\; \backslash left(2\; \backslash text\_2\; c\_1+c\_1^3\; +\; \backslash text\_2\; c\_2\backslash right)\; z^3\; +\; \backslash cdots.\; \backslash 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 :$\backslash begink\_\; \&\; k\_\; \&\; 0\; \&\; 0\; \&\; \backslash cdots\; \backslash \backslash \; k\_\; \&\; k\_\; \&\; k\_\; \&\; 0\; \&\; \backslash cdots\; \backslash \backslash \; k\_\; \&\; k\_\; \&\; k\_\; \&\; k\_\; \&\; \backslash cdots\; \backslash \backslash \; \backslash vdots\; \&\; \backslash vdots\; \&\; \backslash vdots\; \&\; \backslash vdots\; \backslash end\; =\; \backslash begink\_\; \&\; 0\; \&\; 0\; \&\; 0\; \&\; \backslash cdots\; \backslash \backslash \; k\_\; \&\; k\_\; \&\; 0\; \&\; 0\; \&\; \backslash cdots\; \backslash \backslash \; k\_\; \&\; k\_\; \&\; k\_\; \&\; 0\; \&\; \backslash cdots\; \backslash \backslash \; \backslash vdots\; \&\; \backslash vdots\; \&\; \backslash vdots\; \&\; \backslash vdots\; \backslash end\; \backslash cdot\; \backslash beginc\_1\; \&\; 1\; \&\; 0\; \&\; 0\; \&\; \backslash cdots\; \backslash \backslash \; \backslash text\_2\; \&\; c\_2\; \&\; 1\; \&\; 0\; \&\; \backslash cdots\; \backslash \backslash \; 0\; \&\; \backslash text\_3\; \&\; c\_3\; \&\; 1\; \&\; \backslash cdots\; \backslash \backslash \; \backslash vdots\; \&\; \backslash vdots\; \&\; \backslash vdots\; \&\; \backslash vdots\; \backslash end,$ where $j\_0\; \backslash equiv\; k\_\; =\; 1$, $j\_n\; =\; k\_$ for $n\; \backslash geq\; 1$, $k\_\; =\; 0$ if $r\; >\; s$, and where for all integers $p,\; q\; \backslash geq\; 0$, we have an ''addition formula'' relation given by :$j\_\; =\; k\_\; \backslash cdot\; k\_\; +\; \backslash sum\_^\; \backslash text\_2\; \backslash cdots\; \backslash text\_\; \backslash times\; k\_\; \backslash cdot\; k\_.$ Properties of the ^{th} convergent functions

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, $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$, $\backslash alpha\; \backslash in\; \backslash 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.Examples

Generating functions for the sequence of square numbers ''a''Ordinary generating function

:$G(n^2;x)=\backslash sum\_^\backslash infty\; n^2x^n\; =\; \backslash frac$Exponential generating function

:$\backslash operatorname(n^2;x)=\backslash sum\; \_^\backslash infty\; \backslash 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 :$\backslash sum\_\; \backslash frac\; =\; \backslash sum\_\; \backslash frac\; +\; \backslash sum\_\; \backslash frac,$ where we have the special case identity for the generating function of the divisor function, $d(n)\; \backslash equiv\; \backslash sigma\_0(n)$, given by :$\backslash sum\_\; \backslash frac\; =\; \backslash sum\_\; \backslash frac.$Bell series

:$\backslash operatorname\_p(n^2;x)=\backslash sum\_^\backslash infty\; (p^)^2x^n=\backslash frac$Dirichlet series generating function

:$\backslash operatorname(n^2;s)=\backslash sum\_^\backslash infty\; \backslash frac=\backslash zeta(s-2),$ using theRiemann 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 = ...

.
The sequence ''aRiemann 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 = ...

, has the ordinary generating function:
:$\backslash sum\_^\; a\_k\; x^k\; =\; x\; +\; \backslash sum\_\; x^\; +\; \backslash underset\; x^\; +\; \backslash underset\; x^\; +\; \backslash underset\; x^\; +\; \backslash 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,\backslash ldots\; t\_r$ and the column sums are $s\_1,\backslash ldots\; s\_c$. Then, according to I. J. Good, the number of such tables is the coefficient of :$x\_1^\backslash ldots\; x\_r^y\_1^\backslash ldots\; y\_c^$ in :$\backslash prod\_^\backslash prod\_^c\backslash frac.$ In the bivariate case, non-polynomial double sum examples of so-termed "''double''" or "''super''" generating functions of the form $G(w,\; z)\; :=\; \backslash sum\_\; g\_\; w^m\; z^n$ include the following two-variable generating functions for the binomial coefficients, the Stirling numbers, and the Eulerian numbers: :$\backslash begin\; e^\; \&\; =\; \backslash sum\_\; \backslash binom\; w^m\; \backslash frac\; \backslash \backslash \; e^\; \&\; =\; \backslash sum\_\; \backslash left\backslash \; w^m\; \backslash frac\; \backslash \backslash \; \backslash frac\; \&\; =\; \backslash sum\_\; \backslash left[\backslash begin\; n\; \backslash \backslash \; m\; \backslash end\; \backslash right]\; w^m\; \backslash frac\; \backslash \backslash \; \backslash frac\; \&\; =\; \backslash sum\_\; \backslash left\backslash langle\backslash begin\; n\; \backslash \backslash \; m\; \backslash end\; \backslash right\backslash rangle\; w^m\; \backslash frac\; \backslash \backslash \; \backslash frac\; \&=\; \backslash sum\_\; \backslash left\backslash langle\backslash begin\; m+n+1\; \backslash \backslash \; m\; \backslash end\; \backslash right\backslash rangle\; \backslash frac.\; \backslash 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 $s\_n\; =\; \backslash sum\_^$. We then know that $S(z)\; =\; \backslash frac$ for the corresponding ordinary generating functions. For example, we can manipulate $s\_n=\backslash sum\_^\; H\_$, where $H\_k\; =\; 1\; +\; \backslash frac\; +\; \backslash cdots\; +\; \backslash frac$ are the harmonic numbers. Let $H(z)\; =\; \backslash sum\_$ be the ordinary generating function of the harmonic numbers. Then :$H(z)\; =\; \backslash dfrac\backslash ,,$ and thus :$S(z)\; =\; \backslash sum\_\; =\; \backslash dfrac\backslash ,.$ Using $\backslash frac\; =\; \backslash sum\_$, Generating function#Convolution .28Cauchy products.29, convolution with the numerator yields :$s\_n\; =\; \backslash sum\_^\; =\; (n+1)H\_n\; -\; n\backslash ,,$ which can also be written as :$\backslash sum\_^\; =\; (n+1)(H\_\; -\; 1)\backslash ,.$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 $\backslash langle\; f\_n\; \backslash rangle$ we define the two sequences of sums :$s\_n\; :=\; \backslash sum\_^n\; \backslash binom\; f\_m\; 3^$ :$\backslash widetilde\_n\; :=\; \backslash sum\_^n\; \backslash binom\; (m+1)(m+2)(m+3)\; f\_m\; 3^,$ for all $n\; \backslash 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)\; =\; \backslash frac\; F\backslash left(\backslash frac\backslash right).$ Since the generating function for the sequence $\backslash langle\; (n+1)(n+2)(n+3)\; f\_n\; \backslash 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 :$\backslash widetilde(z)\; =\; \backslash frac\; F\backslash left(\backslash frac\backslash right)+\backslash frac\; F^\backslash left(\backslash frac\backslash right)+\backslash frac\; F^\backslash left(\backslash frac\backslash right)+\backslash frac\; F^\backslash left(\backslash frac\backslash right).$ In particular, we may write this modified sum generating function in the form of :$a(z)\; \backslash cdot\; S(z)\; +\; b(z)\; \backslash cdot\; z\; S^(z)\; +\; c(z)\; \backslash cdot\; z^2\; S^(z)\; +\; d(z)\; \backslash 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: :$\backslash begin\; \backslash widetilde\_n\; \&\; =\; [z^n]\backslash left(6(1-3z)^3\; \backslash sum\_\; s\_n\; z^n\; +\; 18\; (1-3z)^3\; \backslash sum\_\; n\; s\_n\; z^n\; +\; 9\; (1-3z)^3\; \backslash sum\_\; n(n-1)\; s\_n\; z^n\; +\; (1-3z)^3\; \backslash sum\_\; n(n-1)(n-2)\; s\_n\; z^n\backslash right)\; \backslash \backslash \; \&\; =\; (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\_.\; \backslash 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\; \backslash times\; n$ rectangle with unmarked $2\; \backslash times\; 1$ domino pieces. Let the auxiliary sequence, $V\_n$, be defined as the number of ways to cover a $3\; \backslash 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\; +\; \backslash cdots$ :$V(z)\; =\; z\; +\; 4z^3\; +\; 15\; z^5\; +\; 56\; z^7\; +\; \backslash cdots.$ If we consider the possible configurations that can be given starting from the left edge of the $3\; \backslash times\; n$ rectangle, we are able to express the following mutually dependent, or ''mutually recursive'', recurrence relations for our two sequences when $n\; \backslash geq\; 2$ defined as above where $U\_0\; =\; 1$, $U\_1\; =\; 0$, $V\_0\; =\; 0$, and $V\_1\; =\; 1$: :$\backslash begin\; U\_n\; \&\; =\; 2\; V\_\; +\; U\_\; \backslash \backslash \; V\_n\; \&\; =\; U\_\; +\; V\_.\; \backslash end$ Since we have that for all integers $m\; \backslash geq\; 0$, the index-shifted generating functions satisfy $z^m\; G(z)\; =\; \backslash sum\_\; g\_\; z^n$ (incidentally, we also have a corresponding formula when $m\; <\; 0$ given by $\backslash sum\_\; g\_\; z^n\; =\; \backslash 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 :$\backslash begin\; U(z)\; \&\; =\; 2z\; V(z)\; +\; z^2\; U(z)\; +\; 1\; \backslash \backslash \; V(z)\; \&\; =\; z\; U(z)\; +\; z^2\; V(z)\; \backslash \backslash \; \&\; =\; \backslash frac\; U(z),\; \backslash end$ which then implies by solving the system of equations (and this is the particular trick to our method here) that :$U(z)\; =\; \backslash frac\; =\; \backslash frac\; \backslash cdot\; \backslash frac\; +\; \backslash frac\; \backslash cdot\; \backslash 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\_\; \backslash equiv\; 0$ and that :$U\_\; =\; \backslash left\backslash lceil\; \backslash frac\; \backslash right\backslash rceil,$ for all integers $n\; \backslash 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)\; \backslash Leftrightarrow\; [z^n]C(z)\; =\; \backslash sum\_^$ #Consider ''A''(''z'') and ''B''(''z'') are exponential generating functions. #:$C(z)\; =\; A(z)B(z)\; \backslash Leftrightarrow\; [z^n/n!]C(z)\; =\; \backslash sum\_^n\; \backslash 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)\; \backslash Leftrightarrow\; [z^n]C(z)\; =\; \backslash sum\_\; f\_j\; g\_k\; h\_\backslash ell$ #Consider the $m$-fold convolution of a sequence with itself for some positive integer $m\; \backslash geq\; 1$ (see the example below for an application) #:$C(z)\; =\; G(z)^m\; \backslash Leftrightarrow\; [z^n]C(z)\; =\; \backslash sum\_\; g\_\; g\_\; \backslash 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\; \backslash geq\; 0$ cents in coin denominations of values in the set $\backslash $ (i.e., in pennies, nickels, dimes, quarters, and half dollars, respectively) is generated by the product :$C(z)\; =\; \backslash frac\; \backslash frac\; \backslash frac\; \backslash frac\; \backslash 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 $\backslash prod\_\; \backslash left(1\; -\; z^n\backslash 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\; \backslash cdot\; x\_1\; \backslash 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\; \backslash cdot\; (x\_1\; \backslash cdot\; x\_2)$ and $(x\_0\; \backslash cdot\; x\_1)\; \backslash cdot\; x\_2$. It follows that the sequence satisfies a recurrence relation given by :$C\_n\; =\; \backslash sum\_^\; C\_k\; C\_\; +\; \backslash delta\_\; =\; C\_0\; C\_\; +\; C\_1\; C\_\; +\; \backslash cdots\; +\; C\_\; C\_0\; +\; \backslash delta\_,\backslash \; n\; \backslash geq\; 0,$ and so has a corresponding convolved generating function, $C(z)$, satisfying :$C(z)\; =\; z\; \backslash cdot\; C(z)^2\; +\; 1.$ Since $C(0)\; =\; 1\; \backslash neq\; \backslash infty$, we then arrive at a formula for this generating function given by :$\backslash begin\; C(z)\; \&\; =\; \backslash frac\; \backslash \backslash \; \&\; =\; \backslash sum\_\; \backslash frac\backslash binom\; z^n.\; \backslash end$ Note that the first equation implicitly defining $C(z)$ above implies that :$C(z)\; =\; \backslash 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 $\backslash $ 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\; \backslash 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\; \backslash 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\; \backslash cdot\; 1\; +\; 2\; \backslash cdot\; 2\; +\; 1\; \backslash cdot\; 3\; +\; 2\; \backslash cdot\; 1\; \backslash cdot\; 1\; +\; 1\; \backslash cdot\; 2\; \backslash cdot\; 1\; +\; 1\; \backslash cdot\; 1\; \backslash cdot\; 2\; +\; 1\backslash cdot1\backslash cdot1\backslash cdot1\backslash 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\; =\; \backslash sum\_\; \backslash sum\_\; g\_\; g\_\; \backslash cdots\; g\_,$ from which we see that the ordinary generating function for this sequence is given by the next sum of convolutions as :$\backslash begin\; F(z)\; \&\; =\; G(z)\; +\; G(z)^2\; +\; G(z)^3\; +\; \backslash cdots\; \backslash \backslash [6pt]\; \&\; =\; \backslash frac\; \backslash \backslash [6pt]\; \&\; =\; \backslash frac\; =\; \backslash frac,\; \backslash 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)\; =\; \backslash 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\; =\; \backslash sum\_\; \backslash quad\; (m,n\; \backslash in\; \backslash mathbb\_0)$ we can treat $n$ as a "free" parameter, and set :$F(z)\; =\; \backslash sum\_z^n$ Interchanging summation (“snake oil”) gives :$F(z)\; =\; \backslash sum\_\backslash sum\_$ Now the inner sum is $\backslash frac$. Thus :$\backslash begin\; F(z)\; \&=\; \backslash frac\backslash sum\_\; \backslash \backslash \; \&=\; \backslash frac\backslash sum\_\; \backslash quad\; \backslash text\; C\_k\; =\; k^\backslash text\; \backslash text\; \backslash \backslash \; \&=\; \backslash frac\backslash frac\; \backslash \backslash \; \&=\; \backslash frac(1-\backslash frac)\; \backslash \backslash \; \&=\; \backslash frac\; =\; z\backslash frac.\; \backslash end$ Then we obtain :$s\_n\; =\; \backslash binom\backslash quad\; \backslash text\; \backslash quad\; m\backslash geq1\; \backslash quad,\backslash quad\; s\_n\; =\; [n\; =\; 0]\backslash quad\; \backslash text\; \backslash quad\; m\; =\; 0.$Generating functions prove congruences

We say that two generating functions (power series) are congruent modulo $m$, written $A(z)\; \backslash equiv\; B(z)\; \backslash pmod$ if their coefficients are congruent modulo $m$ for all $n\; \backslash geq\; 0$, i.e., $a\_n\; \backslash equiv\; b\_n\; \backslash 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\; \backslash geq\; 2$. For example, we can prove that the Euler numbers, $\backslash langle\; E\_n\; \backslash rangle\; =\; \backslash langle\; 1,\; 1,\; 5,\; 61,\; 1385,\; \backslash ldots\; \backslash rangle\; \backslash longmapsto\; \backslash langle\; 1,1,2,1,2,1,2,\backslash ldots\; \backslash rangle\; \backslash pmod$, satisfy the following congruence modulo $3$: :$\backslash sum\_\; E\_n\; z^n\; =\; \backslash frac\; \backslash 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)\; =\; \backslash frac\; \backslash frac\; \backslash frac\; \backslash 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\; \backslash leq\; n\; <\; 2p$. Then 1) the function $A\_p(z)$ is rational for all $p\; \backslash geq\; 2$ where we assume that one of divisibility criteria of $p,\; p\_1,\; p\_1p\_2,\; p\_1p\_2p\_3\backslash cdots$ is met, i.e., $p\; ,\; p\_1\; p\_2\; \backslash cdots\; p\_k$ for some $k\; \backslash geq\; 1$; and 2) If the integer $p$ divides the product $p\_1\; p\_2\; \backslash cdots\; p\_k$, then we have that $A(z)\; \backslash equiv\; A\_k(z)\; \backslash 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)\; :=\; \backslash sum\_^n\; \backslash left[\backslash begin\; n\; \backslash \backslash \; k\; \backslash end\; \backslash right]\; x^k\; =\; x(x+1)(x+2)\; \backslash cdots\; (x+n-1),\backslash \; n\; \backslash 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)]\; \backslash cdot\; [x(x+1)]\; \backslash cdots\; =\; x^\; (x+1)^,$ which implies that the parity of these Stirling numbers matches that of the binomial coefficient :$\backslash left[\backslash begin\; n\; \backslash \backslash \; k\; \backslash end\; \backslash right]\; \backslash equiv\; \backslash binom\; \backslash pmod,$ and consequently shows that $\backslash left[\backslash begin\; n\; \backslash \backslash \; k\; \backslash end\; \backslash right]$ is even whenever $k\; <\; \backslash left\backslash lceil\; \backslash frac\; \backslash right\backslash 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 :$\backslash begin\; \backslash left[\backslash begin\; n\; \backslash \backslash \; m\; \backslash end\; \backslash right]\; \&\; \backslash equiv\; [x^m]\; \backslash left(\; x^\; (x+1)^\; (x+2)^\; \backslash right)\; \&\&\; \backslash pmod\; \backslash \backslash \; \&\; \backslash equiv\; \backslash sum\_^\; \backslash binom\; \backslash binom\; \backslash times\; 2^\; \&\&\; \backslash pmod.\; \backslash 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 : $\backslash begin\; \backslash sum\_\; p(n)\; z^n\; \&\; =\; \backslash frac\; \backslash \backslash [4pt]\; \&\; =\; 1\; +\; z\; +\; 2z^2\; +\; 3\; z^3\; +\; 5z^4\; +\; 7z^5\; +\; 11z^6\; +\; \backslash cdots.\; \backslash 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: :$\backslash begin\; p(5m+4)\; \&\; \backslash equiv\; 0\; \backslash pmod\; \backslash \backslash \; p(7m+5)\; \&\; \backslash equiv\; 0\; \backslash pmod\; \backslash \backslash \; p(11m+6)\; \&\; \backslash equiv\; 0\; \backslash pmod\; \backslash \backslash \; p(25m+24)\; \&\; \backslash equiv\; 0\; \backslash pmod.\; \backslash 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^,\; \backslash ldots$, all of which otherwise have a remainder of $1$ modulo $5$. Thus we may write :$\backslash frac\; \backslash equiv\; \backslash frac\; \backslash pmod\; \backslash qquad\; \backslash iff\; \backslash qquad\; \backslash frac\; \backslash equiv\; 1\; \backslash pmod,$ which in particular shows us that :$\backslash frac\; \backslash equiv\; 1\; \backslash pmod.$ Hence, we easily see that $5$ divides each coefficient of $z^$ in the infinite product expansions of :$z\; \backslash cdot\; \backslash frac\; =\; z\; \backslash cdot\; \backslash left\backslash ^\; \backslash times\; \backslash frac.$ Finally, since we may write the generating function for the partition function as :$\backslash begin\; \&\; \backslash frac\; \backslash \backslash [5pt]\; =\; \&\; z\; \backslash cdot\; \backslash frac\; \backslash times\; (1+z^5+z^+\backslash cdots)(1+z^+z^+\backslash cdots)\; \backslash cdots\; \backslash \backslash [5pt]\; =\; \&\; z\; +\; \backslash sum\_\; p(n-1)\; z^n,\; \backslash end$ we may equate the coefficients of $z^$ in the previous equations to prove our desired congruence result, namely that, $p(5m+4)\; \backslash equiv\; 0\; \backslash pmod$ for all $m\; \backslash 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\; :=\; \backslash sum\_^\; \backslash 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\; :=\; \backslash sum\_\; \backslash binom\; a\_k$, then the generating function for the modified sum expressions is given by $S(z)\; =\; \backslash frac\; A\backslash left(\backslash frac\backslash 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, $\backslash widehat(z)$, and vice versa given by :$F(z)\; =\; \backslash int\_0^\backslash infty\; \backslash widehat(tz)\; e^\; \backslash ,\; dt$ :$\backslash widehat(z)\; =\; \backslash frac\; \backslash int\_^\backslash pi\; F\backslash left(z\; e^\backslash right)\; e^\; \backslash ,\; d\backslash 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

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 exampleAitken'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\; =\; \backslash exp\backslash left(x\; \backslash log\; F(z)\backslash right)\; =\; \backslash 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,\; \backslash ldots$, forms a ''convolution family'' if $\backslash deg\backslash \; \backslash leq\; n$ and if the following convolution condition holds for all $x,\; y$ and for all $n\; \backslash geq\; 0$: :$f\_n(x+y)\; =\; f\_n(x)\; f\_0(y)\; +\; f\_(x)\; f\_1(y)\; +\; \backslash 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!\; \backslash cdot\; f\_n(x)$ is ofbinomial 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)\; =\; \backslash delta\_$, and
* For arbitrary (fixed) $x,\; y,\; t\; \backslash in\; \backslash mathbb$, these polynomials satisfy convolution formulas of the form
:$\backslash begin\; f\_n(x+y)\; \&\; =\; \backslash sum\_^n\; f\_k(x)\; f\_(y)\; \backslash \backslash \; f\_n(2x)\; \&\; =\; \backslash sum\_^n\; f\_k(x)\; f\_(x)\; \backslash \backslash \; xn\; f\_n(x+y)\; \&\; =\; (x+y)\; \backslash sum\_^n\; k\; f\_k(x)\; f\_(y)\; \backslash \backslash \; \backslash frac\; \&\; =\; \backslash sum\_^n\; \backslash frac\; \backslash frac.\; \backslash end$
For a fixed non-zero parameter $t\; \backslash in\; \backslash mathbb$, we have modified generating functions for these convolution polynomial sequences given by
: $\backslash frac\; =\; [z^n]\; \backslash mathcal\_t(z)^x,$
where $\backslash mathcal\_t(z)$ is implicitly defined by a functional equation of the form $\backslash mathcal\_t(z)\; =\; F\backslash left(x\; \backslash mathcal\_t(z)^t\backslash right)$.
Moreover, we can use matrix methods (as in the reference) to prove that given two convolution polynomial sequences, $\backslash langle\; f\_n(x)\; \backslash rangle$ and $\backslash langle\; g\_n(x)\; \backslash rangle$, with respective corresponding generating functions, $F(z)^x$ and $G(z)^x$, then for arbitrary $t$ we have the identity
:$[z^n]\; \backslash left(G(z)\; F\backslash left(z\; G(z)^t\backslash right)\backslash right)^x\; =\; \backslash sum\_^n\; F\_k(x)\; G\_(x+tk).$
Examples of convolution polynomial sequences include the ''binomial power series'', $\backslash mathcal\_t(z)\; =\; 1\; +\; z\; \backslash 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 inHistory

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-transformNotes

References

* * 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,