Calculator Inputs
Formula Used
- General ordinary generating function: A(x) = Σ anxn, for n ≥ 0.
- Constant sequence: an = c gives A(x) = c / (1 - x).
- Arithmetic sequence: an = a0 + dn gives A(x) = a0 / (1 - x) + dx / (1 - x)2.
- Geometric sequence: an = arn gives A(x) = a / (1 - rx).
- Fibonacci-style recurrence: an = an-1 + an-2 gives A(x) = (a0 + (a1 - a0)x) / (1 - x - x2).
- Second-order recurrence: an = pan-1 + qan-2 gives A(x) = (a0 + (a1 - pa0)x) / (1 - px - qx2).
- Partial sum at chosen x: SN(x) = Σ from n = 0 to N of anxn.
- Radius of convergence: For rational OGFs, it is the distance from 0 to the nearest pole.
How to Use This Calculator
- Select the sequence mode that best matches your series.
- Enter coefficients, recurrence values, or progression parameters.
- Choose how many terms you want displayed.
- Provide the x value for numerical evaluation.
- Press Calculate OGF to generate the formula and table.
- Review the closed-form value, partial sum, radius, and convergence message.
- Use the Plotly chart to compare coefficient behavior and accumulated series value.
- Download the coefficient table as CSV or export the result summary as PDF.
Example Data Table
| Mode | Sample Inputs | Resulting OGF | First Few Terms |
|---|---|---|---|
| Geometric | a = 3, r = 2 | 3 / (1 - 2x) | 3, 6, 12, 24, 48 |
| Arithmetic | a₀ = 2, d = 3 | 2 / (1 - x) + 3x / (1 - x)² | 2, 5, 8, 11, 14 |
| Fibonacci-style | f₀ = 0, f₁ = 1 | x / (1 - x - x²) | 0, 1, 1, 2, 3 |
| Custom | 1, 4, 9, 16, 25 | 1 + 4x + 9x² + 16x³ + 25x⁴ | 1, 4, 9, 16, 25 |
Frequently Asked Questions
1. What is an ordinary generating function?
An ordinary generating function turns a sequence into a power series. Each coefficient in the series matches one term of the original sequence, making algebraic manipulation easier.
2. When should I use ordinary instead of exponential generating functions?
Use ordinary generating functions when sequence position alone matters. Exponential generating functions are usually better when labeled objects, factorial scaling, or combinatorial arrangements are central.
3. Why does the calculator show both closed-form value and partial sum?
The closed-form value comes from the rational expression when available. The partial sum shows what you get from finitely many terms, which is useful for approximation and convergence checks.
4. What does the radius of convergence tell me?
The radius shows how far from zero the power series converges. If your chosen x lies inside that radius, the infinite series behaves properly and the sum is meaningful.
5. Can I use this tool for recurrence relations?
Yes. The calculator supports Fibonacci-style sequences and general second-order linear recurrences. It computes the first terms and the corresponding rational generating function automatically.
6. What happens in custom coefficient mode?
Custom mode builds a finite polynomial from the numbers you enter. It is ideal for exploring sample data, partial series expansions, or truncated sequences without assuming a recurrence.
7. Why might the closed-form value be undefined?
If the selected x makes the denominator zero, the rational expression has a pole. In that case, the calculator warns you and still displays the finite-term table.
8. What can I do with the CSV and PDF options?
The CSV file exports the coefficient table for spreadsheets or reports. The PDF option saves the current result summary and table in a printable format.