Quarry School

Recursive formulas

Subject: MathematicsLeans on: Reading a subscriptLeans on: Order of operations
Level 1 · FoundationsAbout 9 min read3 new terms
How this was estimated

Programmatic estimate. Rung levels, worked steps, prerequisites, terms and sentence length contribute to this level. It describes the lesson, not your ability.

Reading counts the whole lesson, including folded explanations, at 180 words a minute. Practice allows two minutes per item. These are planning assumptions; take the time you need.

AI estimate unavailable.

Path to here

Open the unit’s lesson list to follow the lesson order.

    Quick review (2 minutes)

    In plain words

    Some sequences are easier to describe by how each term comes from the one before.

    Rule

    A recursive formula has two parts: the starting term or terms, and a rule that gives an from earlier terms, stated with the positions n it holds for. Both parts are needed. A rule that uses the k preceding terms and holds for n ≥ k + 1 needs the k starting terms a1 to ak.

    Step

    1. Write down the starting term or terms.

    2. Read the rule and the values of n it holds for; an−1 is the preceding term, one position before an, and an−2 is the term two positions before.

    3. Find the next term by putting the terms you already have into the rule.

    4. Repeat, one term at a time, until you reach the position asked for.

    Question

    On day 1 a tank holds 400 liters. Each day after that, half of the water in the tank is used and then 300 liters are added. Write a recursive formula for an, the liters in the tank on day n, and find the amount on day 4. In plain words: half of yesterday's amount, plus 300, starting from 400.

    Answer

    a1 = 400, an = 0.5an−1 + 300 for n ≥ 2; 575 liters on day 4

    Trap

    Giving the rule without the starting term. The rule an = an−1 + 5 alone fits 2, 7, 12, … and also 10, 15, 20, …; a recursive formula names one sequence only when the starting term is stated as well.

    Term

    sequence

    Definition

    A list of numbers in a fixed order; a function whose inputs are its positions: 1, 2, 3, … without end for an infinite sequence, or 1 to k for a finite sequence with k terms.

    Term

    term

    Definition

    One of the numbers in a sequence; an is the term at position n.

    Term

    explicit formula

    Definition

    A formula that gives the term an from its position n alone.

    Term

    recursive formula

    Definition

    A starting term or terms, with a rule that gives each later term from the terms before it.

    1 In plain words

    Some sequences are easier to describe by how each term comes from the one before. A recursive formula gives a starting term and a rule for the next term: a1 = 3 and an = 2an−1 + 1 for n ≥ 2. Here an−1 is the term before an, the preceding term. Starting from 3, the rule gives 2 · 3 + 1 = 7, then 2 · 7 + 1 = 15, then 2 · 15 + 1 = 31. It is like a bank balance: this month's balance comes from last month's balance and what happened in between, and you need the opening balance to get started.

    2 Picture it

    a1=3

    an = 2an−1 + 1 for n ≥ 2

    3, 7, 15, 31, …

    Reminder

    Reminder: Reading a subscript, Order of operations
    • Reading a subscript. an−1 is the term one position before an: when n = 4, an−1 is a3.
    • Order of operations. In 2 · 7 + 1, multiply first: 14 + 1 = 15.

    3 Why

    The rule alone says how to get from one term to the next and says nothing about where to begin, so different starting terms usually give different sequences. The starting term or terms pick one of them. For a rule that uses one preceding term, once a1 is known the rule fixes a2, then a3, and so on. A rule that uses the k preceding terms needs the first k terms, and then fixes the term after them, and the one after that. Either way every term is reached after finitely many steps, so, as long as the rule can be worked out at every step, the two parts together decide the whole sequence.

    4 The rule

    A recursive formula has two parts: the starting term or terms, and a rule that gives an from earlier terms, stated with the positions n it holds for.

    Both parts are needed. A rule that uses the k preceding terms and holds for n≥k+1 needs the k starting terms a1 to ak.

    The same idea, other ways

    Step by step

    With a1 = 3 and an = 2an−1 + 1 for n ≥ 2: a2 = 2a1 + 1 = 7, a3 = 2a2 + 1 = 15, a4 = 2a3 + 1 = 31. Each new term uses the preceding term.

    input noutput a_(n)1327315431563
    a1 = 3 and an = 2an−1 + 1: each term is twice the one before, plus 1.
    Two starting terms

    A rule may reach back two terms. The Fibonacci sequence has a1 = 1, a2 = 1 and an = an−1 + an−2 for n ≥ 3: each term is the sum of the two before it, giving 1, 1, 2, 3, 5, 8, 13. Because the rule uses two earlier terms, it needs two starting terms.

    Reading a rule from a list

    To write a recursive rule for a list of terms, compare each term with the one before it. If every difference is the same number, the rule adds that number; if every quotient is the same number, the rule multiplies by it. For 5, 10, 20, 40 each quotient is 2 (105 = 2010 = 4020 = 2), so a1 = 5 and an = 2an−1 for n ≥ 2 fits the list.

    Recursive and explicit side by side

    a1 = 5 and an = an−1 + 3 for n ≥ 2 gives 5, 8, 11, 14. The explicit formula an = 3n + 2 gives the same terms. The recursive form shows how the sequence grows; the explicit form reaches a50 = 152 in one step, where the recursive form would need the 49 terms before it.

    5 How

    1. Write down the starting term or terms.
    2. Read the rule and the values of n it holds for; an−1 is the preceding term, one position before an, and an−2 is the term two positions before.
    3. Find the next term by putting the terms you already have into the rule.
    4. Repeat, one term at a time, until you reach the position asked for.

    6 Worked example

    Worked example

    Water in a tank

    On day 1 a tank holds 400 liters. Each day after that, half of the water in the tank is used and then 300 liters are added. Write a recursive formula for an, the liters in the tank on day n, and find the amount on day 4. In plain words: half of yesterday's amount, plus 300, starting from 400.

    Show the steps and the answer
    1. a1=400 and an=0.5an−1+300 for n≥2.Using half the water leaves half of the day before's amount, 0.5an−1, and the 300 liters are added to it; day 1 is the starting term.
    2. a2=0.5·400+300=500.Day 2 comes from day 1's amount of 400.
    3. a3=0.5·500+300=550 and a4=0.5·550+300=575.Each day uses the amount found for the day before.
    Answer
    • a1 = 400, an = 0.5an−1 + 300 for n ≥ 2
    • 575 liters on day 4
    Double-check The distance below 600 liters halves each day: 600 − 400 = 200, 600 − 500 = 100, 600 − 550 = 50, 600 − 575 = 25. That fits the rule, since 600 − (0.5a + 300) = 0.5(600 − a).

    Ladder: from easy to exam-hard

    Try each rung before you open its steps.

    Rung 1 of 4

    Add each time

    a1 = 2 and an = an−1 + 5 for n ≥ 2. Write the first four terms.

    Show the steps and the answer
    1. a2=a1+5=2+5=7.At n = 2 the rule reads a2 = a1 + 5, and a1 is the given 2.
    2. a3=7+5=12 and a4=12+5=17.Each term is 5 more than the preceding term.
    Answer
    2, 7, 12, 17
    Double-check 5n − 3 is 2 at n = 1 and goes up by 5 each time n goes up by 1, so it follows the same start and the same rule; at n = 1, 2, 3, 4 it gives 2, 7, 12, 17.

    Rung 2 of 4

    Multiply, then subtract

    a1 = 3 and an = 2an−1 − 1 for n ≥ 2. Find a5.

    Show the steps and the answer
    1. a2=2·3−1=5 and a3=2·5−1=9.Each term doubles the one before and then subtracts 1.
    2. a4=2·9−1=17 and a5=2·17−1=33.a5 needs a4, so the terms are found in order.
    Answer
    a5=33
    Double-check Subtracting 1 from each term gives 2, 4, 8, 16, 32, which doubles each time, as the rule requires: an − 1 = 2an−1 − 2 = 2(an−1 − 1).

    Rung 3 of 4

    Two terms back

    a1 = 2, a2 = 1 and an = an−1 + an−2 for n ≥ 3. Find a6.

    Show the steps and the answer
    1. a3=a2+a1=1+2=3.At n = 3 the two terms before are a2 and a1.
    2. a4=3+1=4 and a5=4+3=7.Each term is the sum of the two preceding terms.
    3. a6=a5+a4=7+4=11.At n = 6 the two terms before are a5 = 7 and a4 = 4.
    Answer
    a6=11
    Double-check The terms are 2, 1, 3, 4, 7, 11, and each one from the 3rd on is the sum of the two before it: 3 = 1 + 2, 4 = 3 + 1, 7 = 4 + 3, 11 = 7 + 4.

    Rung 4 of 4

    Write the formula

    Write a recursive formula that fits 4, 12, 36, 108.

    Show the steps and the answer
    1. 124=3,3612=3 and 10836=3.Dividing each term by the one before shows that every term shown is 3 times the term before it.
    2. a1=4 and an=3an−1 for n≥2.The first term shown is the starting term, and the rule holds from the 2nd term on, where a term before exists.
    Answer
    a1 = 4, an = 3an−1 for n ≥ 2
    Double-check From a1 = 4 the rule gives 3 · 4 = 12, 3 · 12 = 36 and 3 · 36 = 108, the terms shown.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: With a1 = 3 and an = 2an−1 − 1, a3 = 2 · 3 − 1 = 5.
    That computes a2. The term a3 is built from a2, not from a1.
    ✓ Instead: a2 = 5, so a3 = 2 · 5 − 1 = 9.
    ✗ Not this: For an = an−1 + an−2, the starting term a1 = 2 is enough to find a2.
    At n = 2 the rule would need a0, a term before the first one. A rule that reaches back two terms needs two starting terms.
    ✓ Instead: State a1 and a2; the rule then holds for n ≥ 3.

    Tips and tricks

    • Start, then rule: both parts are needed.
    • an−1 is the preceding term.
    • Find the terms in order; each one feeds the next.

    7 The trap

    Giving the rule without the starting term. The rule an = an−1 + 5 alone fits 2, 7, 12, … and also 10, 15, 20, …; a recursive formula names one sequence only when the starting term is stated as well.

    Flash cards

    Say the answer out loud, then flip.

    What two parts does a recursive formula have?
    The starting term or terms, and a rule giving each later term from earlier ones.
    a1 = 10 and an = an−1 − 4 for n ≥ 2. What is a3?
    a2 = 6, so a3 = 2.
    Why does the Fibonacci rule need two starting terms?
    • Its rule adds the two preceding terms, so it first applies at n = 3
    • the 1st and 2nd terms have to be given.