Generating Functions I
Generating Functions I
FELIX GOTTI
where f (n) (x) is the n-th derivative of f (x). We know from Calculus that the Maclaurin
series of the function (1 − x)−1 is
∞
1 X
(0.2) = xn .
1 − x n=0
The Maclaurin series of every polynomial function is itself. In particular, the Bino-
mial Theorem gives us an explicit formula for the Maclaurin series/polynomial of any
nonnegative integer power of the binomial 1 + x:
m
m
X m n
(1 + x) = x .
n=0
n
But what if we want to compute the Maclaurin series of (1 + x)r when r is not a
nonnegative integer?
Proof. Set f (x) = (1 + x)r . For each n ∈ N0 , we see that f (n) (x) = (r)n (1 + x)r−n ,
and so f (n) (0)/n! = nr . Therefore the Maclaurin formula of f (x) is that one in the
right-hand side of (0.4).
As an application of Theorem 1, we can generalize (0.2).
Example 2. Let us find the Maclaurin series of (1 − x)−m when m ∈ N. First, note
that for each n ∈ N0 ,
n−1
(−1)n
−m 1 Y
= (−m − i) = m(m + 1) · · · (m + n − 1)
n n! i=0 n!
n (m + n − 1)! n m+n−1
= (−1) = (−1) .
n!(m − 1)! m−1
Now in light of Theorem 1,
∞ ∞ ∞
−m
X −m n X n m+n−1 n
X m+n−1
(1 + x) = x = (−1) x = (−x)n .
n=0
n n=0
m − 1 n=0
m − 1
Evaluating the previous identity at −x, we obtain that
∞
−m
X m+n−1 n
(1 − x) = x .
n=0
m−1
Example 4. It follows from (0.2) that (1 − x)−1 is the generating function of the
constant sequence all whose terms equal 1.
Example 5. For each m∈ N, we have seen in Example 2 that the generating function
of the sequence m+n−1
m−1 n≥0
is (1 − x)−m .
We can actually use generating functions to find explicit formulas for linear recur-
rence relations. The following example illustrates how to do this.
COMBINATORIAL ANALYSIS 3
Example 6. Consider the sequence (an )n≥0 recurrently defined as follows: P a0 = 2 and
an+1 = 5an for every n ∈ N0 . Let us find a closed formula for
Pa∞n . Let F (x) =P ∞ n=0 an x
n
n ∞ n
be the generating
P∞ function of the sequence (an )n≥0
P∞. Sincen n=0 an+1 x = n=0 5an x ,
n
P ∞ n+1
we see that n=1 an x = n=0 an+1 x = 5x n=0 an x and, therefore,
∞
X ∞
X
n
F (x) = 2 + an x = 2 + 5x an xn = 2 + 5xF (x).
n=1 n=0
from which we can obtain the desired explicit formula for an , namely, an = 2 · 5n for
every n ∈ N0 .
Recall that the Fibonacci sequence is defined by the recurrence Fn+1 = Fn + Fn−1 ,
where F0 = 0 and F1 = 1. Let us conclude this lecture providing an explicit formula
for the Fibonacci numbers.
Example 7. Let F (x) be the generating function of the Fibonacci sequence. Then
∞
X ∞
X ∞
X
n+1 n 2
F (x) − x = Fn+1 x =x Fn x + x Fn−1 xn−1 = xF (x) + x2 F (x).
n=1 n=1 n=1
Practice Exercises
Exercise 1. Consider the sequence (an )n≥0 satisfying that a0 = 3 and an+1 = 5an + 7n
for every n ∈ N0 . Find an explicit formula for an .
Exercise 2. Find a closed form for the generating function of the sequence (n2 )n≥0 .