# 复分析小品-生成函数

In mathematics, a generating function is a way of encoding an infinite sequence of numbers ($a_n$) by treating them as the coefficients of a formal power series. This series is called the generating function of the sequence.

Unlike an ordinary series, the formal power series is not required to converge: in fact, the generating function is not actually regarded as a function, and the “variable” remains an indeterminate. Generating functions were first introduced by Abraham de Moivre 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.