# Generating function

In

mathematics a

**generating function** is a

formal power series whose coefficients encode information about a

sequence a

_{n} that is indexed by the

natural numbers.

There are various types of generating functions - definitions and examples are given below. Every sequence has a generating function of each type. The particular generating function 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 as functions of a formal argument *x*. Sometimes a generating function is evaluated at a specific value of *x*. However, it must be remembered that generating functions are formal power series, and they will not necessarily converge for all values of *x*.

*A generating function is a clothesline on which we hang up a sequence of numbers for display.* -- Herbert Wilf, *generatingfunctionology* (1994)

### Ordinary generating function

The *ordinary generating function* of a sequence a_{n} is

When *generating function* is used without qualification, it is usually taken to mean an ordinary generating function.
If a_{n} is the probability mass function of a discrete random variable, then its ordinary generating function is called a probability-generating function.

The ordinary generating function can be generalised to sequences with multiple indexes. For example, the ordinary generating function of a sequence a_{n}^{m} (where n and m are natural numbers) is

### Exponential generating function

The *exponential generating function* of a sequence a_{n} is

### Lambert series

The *Lambert series* of a sequence a_{n} is

Note that in a Lambert series the index

*n* starts at 1, not at 0.

### Dirichlet series generating functions

Dirichlet series are often classified as generating functions, although they are not strictly formal power series. The *Dirichlet series generating function* of a sequence a_{n} is

Dirichlet series generating functions are especially useful for multiplicative functions, when they have an

Euler product expression. If a

_{n} is a

Dirichlet character then its Dirichlet series generating function is called a

Dirichlet L-series.

Generating functions for the sequence of square numbers a_{n} = n^{2} are :-

### Exponential generating function

### Dirichlet series generating function

## Uses

Generating functions are used to :-

## See also

## References

## External Links