Calculate a recursive sequence a(n) = r × a(n−1) + c from a(0): list the terms, find the nth term and partial sum, and get the explicit formula.

Rule: a(n) = r × a(n−1) + c, starting at a(0). Use r = 1 for arithmetic or c = 0 for geometric sequences.

Up to 200 displayed terms; the first is a(0).

Optional settings


Related Calculators

Calculator Functions

FunctionWhat it doesWhat it requires
Generate sequenceLists the terms of a recursive sequence starting at a(0), with the explicit formula and the sum of the listed termsRequires the coefficient r, the additive constant c, the initial term a(0) and the number of terms, from 1 to 200
Nth term and partial sumFinds the term a(n) and the sum of a(0) through a(n)Requires the coefficient r, the additive constant c, the initial term a(0) and the index n, from 0 to 100,000

Both functions use the same rule and count from index 0, so a(0) is the first term. Setting r = 1 gives an arithmetic sequence with common difference c, and setting c = 0 gives a geometric sequence with common ratio r. The example presets fill in sample values.

Recursive Rule Formula

a(n) = r × a(n−1) + c
a(n)Term at index n; a(n−1) is the term before it
rCoefficient that multiplies the previous term
cConstant added at every step
a(0)Initial term

Generate sequence

With r = 2, c = 1 and a(0) = 0, six terms are 0, 1, 3, 7, 15, 31: each is twice the one before, plus 1. Their sum is 57. With r = 1, c = 3 and a(0) = 5 the rule is arithmetic and four terms are 5, 8, 11, 14.

Nth term and partial sum

The rule is applied n times, one step after another. With r = 2, c = 1 and a(0) = 0, a(10) = 1,023 and the terms a(0) through a(10) add up to 2,036. With r = 1, c = −2 and a(0) = 10, a(20) = −30 and the sum is −210.

Recursive to explicit formula

a(n) = (a(0) − K) × rⁿ + K

K = c ÷ (1 − r), for any r other than 1. When r = 1 the explicit formula is a(n) = a(0) + c × n. Both functions print the explicit formula for the entered values. For r = 2, c = 1 and a(0) = 0, K = −1 and the formula is a(n) = 2ⁿ − 1, which gives 1,023 at n = 10, the same as stepping through the rule. For r = 3, c = 0 and a(0) = 2 it is a(n) = 2 × 3ⁿ, so a(4) = 162.

Limits of This Estimate

  • The rule covers sequences where each term depends only on the term before it, with a fixed r and c. A rule that uses two earlier terms, such as the Fibonacci sequence, or one where the added amount changes with n, does not fit.
  • Terms are computed in floating point, so very long or fast-growing sequences are rounded, and a term too large to represent stops the calculation.
  • The savings and growth presets only illustrate the arithmetic. They are not financial forecasts.