What the definition says
A sequence is defined recursively when its first term u₁ is given together with a rule that gives each term from
the one before it:
- uₙ = f(uₙ₋₁), with u₁ given
The same rule is often written uₙ₊₁ = f(uₙ). Only the numbering differs: both say that the next term is worked out from
the one just before it.
The calculator on this page uses the most common form, where the rule is linear:
With a = 1 this is an arithmetic sequence with common
difference b, and with b = 0 a geometric sequence with common
ratio a.
Worked examples
A dose that builds up. A patient is given 200 mg on the first day. Each day 80% of the amount is still in the body,
and a new dose of 50 mg is given. The amount after n days is uₙ = 0.8 · uₙ₋₁ + 50 with u₁ = 200:
| n |
Working |
uₙ |
| 1 |
|
200 |
| 2 |
0.8 · 200 + 50 |
210 |
| 3 |
0.8 · 210 + 50 |
218 |
| 4 |
0.8 · 218 + 50 |
224.4 |
| 5 |
0.8 · 224.4 + 50 |
229.52 |
The terms grow, but more and more slowly. They approach 250, because 0.8 · 250 + 50 = 250: at 250 as much leaves as
is added.
The Tower of Hanoi. The least number of moves for n discs is u₁ = 1 and uₙ = 2 · uₙ₋₁ + 1. The sequence is 1, 3, 7,
15, 31, … and u₁₀ = 1,023, which agrees with 2¹⁰ − 1.
For the linear rule with a ≠ 1 there is a formula that gives uₙ directly. Let L = b/(1 − a), the number the rule leaves
unchanged. Then
For the dose, L = 50/0.2 = 250, and u₅ = 0.8⁴ · (200 − 250) + 250 = 0.4096 · (−50) + 250 = 229.52, as in the table.
The formula also shows when the sequence settles: if −1 < a < 1, aⁿ⁻¹ goes to 0 and uₙ approaches L. If a ≥ 1 or
a ≤ −1 it does not, except when u₁ = L.
Common mistakes
- One step too many. From u₁ to u₅ is four steps, not five. Count the steps as n − 1.
- The wrong first term. Some books start at u₀ instead of u₁. Then u₅ is six terms into the sequence, and the answer
is different.
- Dropping the sign of b. With uₙ = 2uₙ₋₁ − 1 and u₁ = 3 the sequence is 3, 5, 9, 17, 33. With + 1 it is 3, 7, 15,
31, 63.
- Assuming the sequence always settles. When −1 < a < 1 it approaches a limit. With a = 2 it grows
without bound, unless it starts at the fixed point b/(1 − a) and stays there.
Common questions
What is the difference between a recursive and a closed formula?
A recursive formula gives the next term from the one before, so every earlier term has to be worked out first. A
closed formula gives uₙ straight from n. For an arithmetic sequence, uₙ = uₙ₋₁ + d is recursive and
uₙ = u₁ + (n − 1)d is closed.
Can a term depend on more than the one just before it?
Yes. The Fibonacci sequence has uₙ = uₙ₋₁ + uₙ₋₂ with u₁ = u₂ = 1, giving 1, 1, 2, 3, 5, 8, 13, … It needs two first
terms. The calculator here handles only rules that look one term back.
What is a difference equation?
Another name for a recursive rule, used when the sequence describes something that changes in steps, such as year by
year. uₙ = 1.05 · uₙ₋₁ + 1,000 is a saving that grows by 5% a year with 1,000 paid in each year. The total of such
payments can also be found with the
sum of a geometric series.