Generating function

In mathematics, a generating function is a function for which the definition "encodes" values of a sequence, allowing the application of methods of real and complex analysis to problems in algorithmics, combinatorics, number theory, probability and other areas.

Let (an) be a sequence indexed by the natural numbers. The ordinary generating function may be defined purely formally as a power series


 * $$A(z) = \sum_{n=0}^\infty a_n z^n ,\,$$

where for the present we do not address issues of convergence.

The exponential generating function may be defined similarly as a power series


 * $$A(z) = \sum_{n=0}^\infty \frac{a_n}{n!} z^n .\,$$