Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

Generating functions turn sequences into power series so patterns, sums, and recurrences become easier to manipulate. This cheat sheet helps students connect algebraic operations with sequence behavior. It is especially useful for counting problems, recurrence relations, and series identities in advanced high school math.

The main skill is recognizing which series form matches the sequence in a problem.

The core idea is to represent a sequence a0,a1,a2,a_0, a_1, a_2, \ldots by A(x)=n=0anxnA(x) = \sum_{n=0}^{\infty} a_n x^n. Geometric series such as 11x=n=0xn\frac{1}{1-x} = \sum_{n=0}^{\infty} x^n are the starting point for many tricks. Differentiating, integrating, shifting, and multiplying generating functions create new sequences.

Coefficient notation [xn]A(x)[x^n]A(x) lets you extract the exact term you need.

Key Facts

  • The ordinary generating function for a sequence a0,a1,a2,a_0, a_1, a_2, \ldots is A(x)=n=0anxnA(x) = \sum_{n=0}^{\infty} a_n x^n.
  • Coefficient extraction is written as [xn]A(x)[x^n]A(x), meaning the coefficient of xnx^n in the power series A(x)A(x).
  • The basic geometric series identity is 11x=n=0xn\frac{1}{1-x} = \sum_{n=0}^{\infty} x^n for x<1|x| < 1.
  • Shifting a generating function by multiplying by xkx^k gives xkA(x)=n=0anxn+kx^k A(x) = \sum_{n=0}^{\infty} a_n x^{n+k}.
  • Differentiating gives A(x)=n=1nanxn1A'(x) = \sum_{n=1}^{\infty} n a_n x^{n-1}, which helps create factors of nn.
  • The series for counting nonnegative solutions to a+b+c=na+b+c=n is 1(1x)3\frac{1}{(1-x)^3}, and [xn]1(1x)3=(n+22)[x^n]\frac{1}{(1-x)^3} = \binom{n+2}{2}.
  • If a recurrence is linear, multiply both sides by xnx^n, sum over valid nn, and solve algebraically for the generating function.
  • The product A(x)B(x)A(x)B(x) has coefficients [xn]A(x)B(x)=k=0nakbnk[x^n]A(x)B(x) = \sum_{k=0}^{n} a_k b_{n-k}, called convolution.

Vocabulary

Generating function
A power series such as A(x)=n=0anxnA(x) = \sum_{n=0}^{\infty} a_n x^n that stores the terms of a sequence as coefficients.
Coefficient extraction
The notation [xn]A(x)[x^n]A(x) means the coefficient of xnx^n in the expanded form of A(x)A(x).
Ordinary generating function
A generating function where the sequence term ana_n is paired directly with xnx^n.
Geometric series
A series of the form 1+x+x2+x3+1+x+x^2+x^3+\cdots whose sum is 11x\frac{1}{1-x} when x<1|x| < 1.
Convolution
A rule for multiplying generating functions where the coefficient of xnx^n is k=0nakbnk\sum_{k=0}^{n} a_k b_{n-k}.
Recurrence relation
An equation that defines each term of a sequence using earlier terms, such as an=an1+an2a_n = a_{n-1}+a_{n-2}.

Common Mistakes to Avoid

  • Forgetting the starting index is wrong because n=0anxn\sum_{n=0}^{\infty} a_n x^n and n=1anxn\sum_{n=1}^{\infty} a_n x^n store different coefficients.
  • Dropping initial terms after shifting is wrong because multiplying by xx changes the powers and may leave constants such as a0a_0 outside the shifted sum.
  • Using 11x\frac{1}{1-x} for every series is wrong because sequences like 1,2,3,4,1,2,3,4,\ldots need 1(1x)2\frac{1}{(1-x)^2}, not 11x\frac{1}{1-x}.
  • Treating multiplication as term-by-term multiplication is wrong because A(x)B(x)A(x)B(x) uses convolution, so [xn]A(x)B(x)=k=0nakbnk[x^n]A(x)B(x)=\sum_{k=0}^{n}a_k b_{n-k}.
  • Ignoring the condition x<1|x|<1 in analytic problems is wrong because formulas such as 11x=n=0xn\frac{1}{1-x}=\sum_{n=0}^{\infty}x^n rely on convergence when xx is a number.

Practice Questions

  1. 1 Find [x5]11x[x^5]\frac{1}{1-x}.
  2. 2 Find [x4]1(1x)3[x^4]\frac{1}{(1-x)^3}.
  3. 3 If A(x)=112xA(x)=\frac{1}{1-2x}, write the first five terms of the sequence a0,a1,a2,a3,a4a_0,a_1,a_2,a_3,a_4.
  4. 4 Explain why multiplying two generating functions counts combinations of choices whose exponents add to the target power.

Understanding Generating Functions & Series Tricks

A useful way to think about these series is as a bookkeeping system. The power of the variable records a total, such as a score, cost, number of steps, or selected objects. The number multiplying that power records how many ways that total can occur.

This is why generating functions fit counting problems so well. For example, suppose three types of tokens can be chosen any number of times. Each type contributes a list of possible totals.

Multiplying the lists combines one choice from each type. To find the number of selections with total n, keep only the term whose power is n. The algebra follows the same rule as adding totals in a real situation.

Products deserve careful attention because they are easy to use wrongly. When two series are multiplied, a term of total n can come from many pairs of earlier terms. One factor might contribute zero and the other n, or one and n minus one, and so on.

The resulting coefficient adds every valid pair. This process is convolution. It appears outside pure math in probability, signal processing, and counting routes made from separate stages.

Students should write a small table of the first few coefficients before trusting a general result. The table often reveals a missing starting term or an incorrect index shift.

Recurrences become manageable because summing all their equations places related sequence terms into the same algebraic expression. The main danger is the first few terms. A recurrence may begin at n equals two, while a full series begins at n equals zero.

When shifting an indexed sum, the terms omitted at the beginning must be written separately. Those terms carry the initial conditions, and they usually create the extra constants in the final answer. A reliable method is to list the first several sequence values, write each shifted series in words or expanded form, then check that the constant term and the next term agree after solving.

Series tricks are not only symbolic moves. Differentiation weights later terms more heavily, which is useful when a count depends on position or when a factor of n appears. Integration can reverse that weighting and can introduce division by the index.

Replacing the variable by a multiple of itself changes the growth of coefficients. Using a negative variable creates alternating signs, which can represent inclusion and exclusion or repeated cancellation. In school problems, pay attention to what each operation does to the sequence before doing any algebra.

Check a few coefficients at the end. A correct closed form should reproduce the known starting values and obey the original recurrence or counting rule.