How to Find a Closed Form for an Ordinary Generating Function
At a glance
- 1. Specify the sequence
Write the terms and state whether indexing begins at n = 0 or n = 1.
- 2. Form the series
Define the ordinary generating function as the sum of each term multiplied by x to its index.
- 3. Use structure
Apply a known series identity, shift indices, or translate a recurrence into an equation for the generating function.
- 4. Check coefficients
Expand the result far enough to verify that its coefficients match the original sequence.
An ordinary generating function encodes a sequence as the coefficients of a power series. But the title alone does not specify which sequence to use, so it cannot determine one particular closed form. The method depends on the terms or on a rule—such as a recurrence—that defines them.
Definition and indexing
For a sequence , its ordinary generating function (OGF) is
The coefficient of is the sequence term . If a sequence instead starts at , its OGF is commonly written . State the indexing convention, since shifting the starting index changes the series.
A closed form means an expression more compact than the defining infinite sum, often a rational function or an expression involving familiar functions. Some sequences have simple closed forms; others do not have a useful elementary one. A generating function can still be defined as a formal power series even when the series does not converge for any nonzero value of .
Recognize a standard series
Start by writing several terms of the sequence and comparing them with known expansions. The geometric series is the most common starting point:
For example, if , then
for . As a formal power series, the identity also holds without making a numerical convergence claim.
Powers of can be generated by differentiating the geometric series. For , use the operator twice:
Thus the OGF for is . The constant term is zero because the sequence starts with .
Translate a recurrence into an equation
If the sequence is defined recursively, multiply its recurrence by the matching power of and sum over the valid indices. Initial terms must be handled separately; this is where indexing errors often occur.
For example, let the Fibonacci sequence be , , and for . Define . Then
The left side omits the term, which is . Rearranging gives
To check, expand the denominator’s reciprocal: , whose coefficients are the Fibonacci numbers under the stated convention.
Common mistakes
- Leaving out initial terms: When shifting a sum, write down the first few terms or explicitly subtract any terms that fall outside the recurrence’s range.
- Changing the indexing silently: The OGF for may differ by a factor of , or by a shift and a correction term, from one indexed starting at zero.
- Assuming every OGF is rational: Linear recurrences with constant coefficients have rational OGFs, but arbitrary sequences need not. A closed form may not exist in the desired class of expressions.
- Confusing formal identities with convergence: Algebraic manipulations of formal power series concern coefficients. If you interpret the series as a function of a real or complex variable, also check its radius of convergence.
To find a specific OGF, you need the sequence’s terms or a defining rule. Once you have that information, write the series, identify a standard expansion or recurrence, and verify the resulting coefficients.
References
- Herbert S. Wilf, Generatingfunctionology
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.