Recurrences and generating functions: what happens when you turn a sequence into a function
A generating function is the "business card" of a sequence. Multiplication becomes convolution, and recurrences become algebraic equations. We derive the closed form for the Fibonacci numbers (Binet's formula) as a showcase of the method.
You have set up a recurrence, but you cannot find a closed-form solution – a frustrating and common experience. The generating function is a device that packages a sequence into a single formal power series and, in doing so, transforms the recurrence into an algebraic equation that can be solved by routine methods.
1 Generating functions: a sequence's business card
2 Basic generating functions
3 Multiplication is convolution
The most powerful property of generating functions is that their product corresponds to convolution of the coefficient sequences.
4 The generating function of the Fibonacci sequence
We derive the generating function from the recurrence.
5 Binet's formula: from generating function to closed form
We perform a partial fraction decomposition of . Factoring , where and are the roots of :
A partial fraction decomposition followed by geometric series expansion yields the celebrated result.
6 The generating function method: a recipe
The general procedure for solving a recurrence via generating functions consists of four steps:
Multiply both sides of the recurrence by and sum over the appropriate range.
Express everything in terms of the generating function to obtain an algebraic equation.
Solve for in closed form.
Extract the coefficient via partial fractions, known expansions, or other techniques.
7 Takeaway
A generating function packages a sequence into a formal power series – a compact "business card" for the sequence.
The product of generating functions corresponds to convolution, automating multi-stage counting.
The Fibonacci generating function is , from which Binet's formula follows.
The core strategy is to convert a recurrence into an algebraic equation and solve it there.
In the next article, we meet the Catalan numbers – a single sequence that, mysteriously, answers at least five apparently unrelated counting problems.
Mathematics "between the lines" — exploring the intuition textbooks leave out, written in LaTeX on Folio.