happytails.ai
English

Recurrence relation explorer

List the terms of a recurrence exactly and, for linear recurrences with constant coefficients, find the closed form from the characteristic roots. You can also check your own guess against every computed term.

Inputs are limited to 1,000 characters, order 10, forcing polynomials of degree 3 and 1 to 200 terms; exact values may grow to 1,024 digits. Everything is computed on your device in a background worker with a 15 second limit. Downloads are a JSON report and a CSV of terms. Write the recurrence first, then initial values separated by commas or new lines. Up to 1,000 characters. Review the settings before running.

Your result

How to use Recurrence relation explorer
  1. Type the recurrence and initial values, such as a(n) = a(n-1) + a(n-2), a(0) = 0, a(1) = 1.
  2. Optionally add a guess, such as guess: a(n) = 2^n - 1, and choose how many terms to list.
  3. Run the explorer and read the terms, the characteristic roots and the closed form.
  4. Download the JSON report or the CSV of terms.

Report a problem or share an idea.

Useful next steps

Inputs are limited to 1,000 characters, order 10, forcing polynomials of degree 3 and 1 to 200 terms; exact values may grow to 1,024 digits. Everything is computed on your device in a background worker with a 15 second limit. Downloads are a JSON report and a CSV of terms.

Closed forms

For a(n) = c1 a(n-1) + ... + ck a(n-k) + f(n) with a polynomial f, the characteristic polynomial is factored exactly. Each root r of multiplicity m contributes r^n, n r^n and so on, a polynomial particular solution handles f, and the constants come from the initial values. Rational roots and roots of the form p + q*sqrt(d) are supported. Method: Rosen, Discrete Mathematics and Its Applications, 8th edition, section 8.2 (2019).

Checks

The closed form is evaluated exactly at every computed term and must match. A guess is compared term by term; agreement on finitely many terms is evidence, not proof.

Other recurrences

Nonlinear recurrences such as a(n) = n*a(n-1) are expanded exactly but get no closed form. Complex characteristic roots and roots of cubic or higher factors are reported as not supported instead of guessed.