Since 2010 · Powering 2M+ tool runs every month
Since 2010
Add to Chrome

My Toolbox

Automatic Mode

No saved tools yet.

Go Premium
Related tools
Second-Order ODE SolverCubic Equation SolverGeometric Sequence CalculatorStirling Numbers Calculator
Home Page > Math > Sequence Tools

Recurrence Relation Solver

Solve linear homogeneous recurrence relations with constant coefficients. Enter the recurrence and initial values to get the closed form from the characteristic equation, the first N terms, the roots and a growth classification.

Free to useNo sign-up requiredInstant Results
Recurrence Relation SolverTry it now — free ▼
The recurrence is a(n) = c1·a(n−1) + c2·a(n−2) + … + ck·a(n−k). Separate coefficients with commas or spaces. Decimals and fractions like 1/2 are accepted.
Use a(n-k) notation with integer lag k ≥ 1. Operators +, , *, and implicit multiplication all work. Example: a(n) = a(n-1) + 6a(n-2) - 8a(n-3).
You must provide exactly k values, matching the recurrence order.

Embed Recurrence Relation Solver Widget

About Recurrence Relation Solver

The Recurrence Relation Solver computes the closed-form solution of any linear homogeneous recurrence with constant coefficients by solving its characteristic equation, plotting the roots on the complex plane, and generating the first N terms of the sequence. Enter the recurrence either as an ordered coefficient list or as a natural-math expression like a(n) = 3·a(n−1) − 2·a(n−2), and the tool handles distinct real roots, repeated roots, and complex conjugate pairs automatically.

What Is a Linear Recurrence Relation?

A linear homogeneous recurrence relation with constant coefficients of order k has the form:

a(n) = c₁·a(n−1) + c₂·a(n−2) + … + ck·a(n−k)

where c₁, c₂, …, ck are fixed real numbers and k is the order. Together with k initial values a(0), a(1), …, a(k−1), the recurrence defines every subsequent term uniquely. Classic examples include:

The Characteristic Equation Method

To find a closed-form formula for a(n), we look for solutions of the form a(n) = rn. Substituting into the recurrence and dividing through by rn−k gives:

rk − c₁·rk−1 − c₂·rk−2 − … − ck = 0

This is the characteristic equation — a polynomial of degree k in r. By the Fundamental Theorem of Algebra, it has exactly k complex roots (counting multiplicity). The general solution to the recurrence depends on the structure of these roots:

Case 1: Distinct real roots r₁, …, rk

a(n) = A₁·r₁n + A₂·r₂n + … + Ak·rkn

The constants A₁, …, Ak are fixed by plugging in n = 0, 1, …, k−1 and solving a linear system against the initial values.

Case 2: A root r with multiplicity m

… + (A + B·n + C·n2 + … + Z·nm−1) · rn

Each repeated root contributes m linearly independent basis sequences rn, n·rn, n2·rn, …, nm−1·rn.

Case 3: Complex conjugate roots r = ρ·e, r̄ = ρ·e−iθ

… + ρn · [α·cos(nθ) + β·sin(nθ)]

When the recurrence has real coefficients, complex roots always come in conjugate pairs. Each pair combines into a real oscillatory term with geometric envelope ρn and frequency θ.

Growth Classification by the Dominant Root

Let ρ = max|ri| be the largest root magnitude (the spectral radius). Long-term behavior of a(n) is governed by:

Case Behavior Example
ρ < 1 Converges to 0 geometrically a(n) = 0.5·a(n−1) — halving sequence
ρ = 1, simple root Bounded (possibly oscillating) a(n) = a(n−1) − a(n−2) — period-6 cycle
ρ = 1, multiplicity m Polynomial growth ∼ nm−1 a(n) = 2·a(n−1) − a(n−2) — linear growth
ρ > 1, real dominant Geometric growth rate ρ Fibonacci: ρ = φ ≈ 1.618 (golden ratio)
ρ > 1, complex dominant Oscillatory growth (spirals) a(n) = a(n−1) − 2·a(n−2)

Fibonacci — A Worked Example

Consider the Fibonacci recurrence a(n) = a(n−1) + a(n−2) with a(0) = 0 and a(1) = 1.

  1. Characteristic equation: r2 − r − 1 = 0
  2. Roots (quadratic formula): r = (1 ± √5) / 2, so φ ≈ 1.6180 and ψ ≈ −0.6180
  3. General form: a(n) = A·φn + B·ψn
  4. Apply initial conditions: A + B = 0 and A·φ + B·ψ = 1, which gives A = 1/√5, B = −1/√5
  5. Binet's formula: a(n) = (φn − ψn) / √5

Because |ψ| < 1, the second term vanishes as n → ∞, so a(n) is approximately φn / √5 — this is why Fibonacci numbers grow by roughly a factor of φ per step.

How to Use This Solver

  1. Pick an input mode: Guided lets you select the order and enter comma-separated coefficients; Free-form expression accepts full recurrences like a(n) = a(n-1) + 6*a(n-2) - 8*a(n-3).
  2. Enter the coefficients or expression. Decimals (0.5) and fractions (1/2) are both accepted.
  3. Provide initial values. You must supply exactly k values matching the recurrence order: a(0), a(1), …, a(k−1).
  4. Choose how many terms to display (up to 60).
  5. Click Solve. The result page shows the characteristic equation, root locations on the complex plane, the closed-form formula, and an animated bar chart of the sequence.

Supported Cases & Limitations

Applications

Frequently Asked Questions

What is a linear recurrence relation with constant coefficients?

A linear recurrence relation with constant coefficients is an equation of the form a(n) = c₁·a(n−1) + c₂·a(n−2) + … + ck·a(n−k), where c₁, c₂, …, ck are fixed real numbers and k is the order. Each term in the sequence is a linear combination of the previous k terms. Common examples include the Fibonacci recurrence a(n) = a(n−1) + a(n−2) and the Lucas recurrence with different initial values.

What is the characteristic equation of a recurrence?

Given the recurrence a(n) = c₁·a(n−1) + c₂·a(n−2) + … + ck·a(n−k), its characteristic equation is rk − c₁·rk−1 − c₂·rk−2 − … − ck = 0. This polynomial equation has exactly k complex roots (counting multiplicity), and every solution of the recurrence is a linear combination of sequences of the form nj·rn where r is a root and j runs up to its multiplicity minus 1.

How do I get a closed-form formula for a(n)?

Solve the characteristic equation to find its roots r₁, r₂, …, rk. If all roots are distinct, the closed form is a(n) = A₁·r₁n + A₂·r₂n + … + Ak·rkn, where the constants Ai are determined by plugging in the initial values and solving a linear system. If a root r has multiplicity m, it contributes m basis terms: rn, n·rn, n2·rn, …, nm−1·rn. This calculator performs the entire procedure automatically.

What do complex roots mean for the sequence?

When the recurrence has real coefficients, complex roots always appear in conjugate pairs r = ρ·e and r̄ = ρ·e−iθ. Such a pair produces oscillatory behavior: the closed form contains a term 2·ρn·[α·cos(nθ) − β·sin(nθ)]. If ρ equals 1, the sequence oscillates with constant amplitude; if ρ is less than 1, the oscillation decays; if ρ is greater than 1, the amplitude grows geometrically.

Why does the dominant root tell me how the sequence grows?

As n becomes large, the term with the largest |r| dominates every other term because its magnitude grows faster. So if ρ = max|ri|, then |a(n)| is asymptotically proportional to ρn, with an extra polynomial factor if the dominant root is repeated. The solver classifies your sequence based on this principle: convergent to zero when ρ < 1, bounded when ρ = 1, geometric growth when ρ > 1.

Can this tool solve the Fibonacci sequence?

Yes. Enter the recurrence a(n) = a(n−1) + a(n−2) with initial values 0, 1. The calculator derives the characteristic equation r2 − r − 1 = 0 with roots φ = (1 + √5)/2 and ψ = (1 − √5)/2, and returns the Binet formula a(n) = (φn − ψn) / √5. Click the Fibonacci quick example above the input form to see the full worked solution.

Does the tool handle non-homogeneous recurrences like a(n) = a(n−1) + n?

No — this tool solves homogeneous recurrences only (no forcing term). For a non-homogeneous recurrence, decompose the general solution into the homogeneous part (solvable here) plus a particular solution that matches the forcing term. Common particular-solution ansätze are: a polynomial of the same degree as a polynomial forcing, C·rn for exponential forcing, or A·cos(nθ) + B·sin(nθ) for trigonometric forcing.

Further Reading

Reference this content, page, or tool as:

"Recurrence Relation Solver" at https://MiniWebtool.com/recurrence-relation-solver/ from MiniWebtool, https://MiniWebtool.com/

by miniwebtool team. Updated: Apr 21, 2026

You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.

Sequence Tools:

Top & Updated:

Bernoulli ODE SolverQuartic Equation SolverTrigonometric Equation SolverView all →
Home Page > Math > Sequence Tools > Recurrence Relation Solver