The Wolfram Language command GeneratingFunction[expr,
n, x] gives the generating function in the variable for the sequence whose th term is expr. Given a sequence of terms, FindGeneratingFunction[a1, a2, ..., x] attempts to find a simple generating function in
whose th
coefficient is .
Given a generating function, the analytic expression for the th term in the corresponding series can be computing using
SeriesCoefficient[expr,
x,
x0, n].
The generating function is sometimes said to "enumerate"
(Hardy 1999, p. 85).
Generating functions giving the first few powers of the nonnegative integers are given in the following table.
series
1
There are many beautiful generating functions for special functions in number theory. A few particularly nice examples are
Generating functions are very useful in combinatorial enumeration problems. For example, the subset sum problem, which asks the number
of ways
to select
out of
given integers such that their sum equals , can be solved using generating functions.
The generating function of of a sequence of numbers is given by the Z-transform
of
in the variable
(Germundsson 2000).