Skip to main content

Section 5.5 Defining Sequences Recursively

We’ve seen sequences defined explicitly, such as an=n2. Another common way to generate a sequence is by giving a rule for how to generate the next term from the previous term. For example, an=an1+2 where a1=1. Such sequences are called recursively defined sequences.

Example 5.5.1. Explicitly Defined Sequences.

Find the first five terms of the sequence given by an=n2,n0.
Answer 1.
a0=0,a1=1,a2=4,a3=9,a4=16
Find the first five terms of the sequence given by an=1n,n1.
Answer 2.
a1=1,a2=1/2,a3=1/3,a4=1/4,a5=1/5

Activity 5.5.1.

Write out the first 6 terms of the sequence an=2n,n0.

Example 5.5.2. Recursively Defined Sequences.

Find the first five terms of the sequence given by an=an1+2,a1=1.
Answer 1.
a1=1,a2=3,a3=5,a4=7,a5=9
Find the first five terms of the sequence given by an=an1+2,a1=0.
Answer 2.
a1=0,a2=2,a3=4,a4=6,a5=8
Find the first five terms of the sequence given by an=an1+5an2,a0=1,a1=1.
Answer 3.
a0=1,a1=1,a2=6,a3=11,a4=41

Activity 5.5.2.

Write out the first 6 terms of the sequence an=an1+2an2,a0=1,a1=1.
Although both types of sequences use an equation to find an, the recursive sequence also needs to define the first few terms. If we change the initial terms, we get a different sequence. The formula used to generate the recursive sequence is called a recurrence relation, while the first term (or terms) is called the initial condition(s).
An advantage of an explicitly defined sequence is that it is easy to find any particular term. For example, it would be easy to calculate a500 in Example 5.5.1. In order to find a500 in Example 5.5.2, we would need to know a499, and all the terms before that. So we would need to have generated the sequence up to that point to calculate a specific term.
Recursive sequences have the advantage that they can be faster (or computationally simpler) to calculate, especially if you need to generate many terms of the sequence. Computers are good at generating recursive sequences. It also may be the case that we can easily define a recursive sequence in which it is difficult, or even impossible, to express with an explicit formula.

Example 5.5.3. The Fibonacci Sequence.

The Fibonacci sequence is defined recursively by
F1=1,F2=1,Fk=Fk1+Fk2.
Give the first 6 terms of the Fibonacci sequence.
Answer.
1,1,2,3,5,8

Activity 5.5.3.

Write out the 7th, 8th, and 9th terms of the Fibonacci sequence.
The Fibonacci sequence is a good example of a recursively defined sequence where it is difficult to find an explicit formula. An explicit formula for the Fibonacci sequence does exist, we will see it in the next section and in Exercise 5.5.7, but it requires much more sophisticated mathematics to find it than anything we will see in this course. If you are interested, though, this is the sort of thing you would see if you take a combinatorics course. When we do see the formula, it should be clear that it is computationally much harder to work with than the recursive definiton (which is why you rarely see it when working with the Fibonacci sequence).

Activity 5.5.4.

We would like to explore the connection between recursive and explicit sequences.

(a)

Write out the first 6 terms of an=(1)nn!,n0. Is this an explicitly or recursively defined sequence?

(b)

Consider the recurrence relationship ak=ak1k,k1. Write out several terms of the sequence for a couple different choices of initial terms.

(c)

How do the sequences in (a) and (b) compare?
We want to be able to show the relationship between the recursive definition and the explicit definition for a sequence. In this section we will look at proving an explicit sequence satisfies a given recurrence relation. Since, in general, explict formulas contain more information than a recurrence relation, we can use simpler proof techniques to show an explicit sequence satisfies a recurrence relation.

Proving a Sequence Satisfies a Recurrence Relation.

To prove an explicity defined sequence satisfies a recurrence relation:
  • Assume the explicit formula for the sequence.
  • Show, using a LHS/RHS proof, that the recurrence relation holds.
This is always a direct proof. Do not use induction. We will see induction in the next section.

Example 5.5.4. Proving a Recurrence Relation for an Explicit Sequence.

Let an=3n+1,n0. Show this sequence satisfies the recurrence relation ak=ak1+3, for k1.

Proof.

Assume an=3n+1 for all n0. Show this sequence statisfies the recurrence relation ak=ak1+3.
LHS: ak=3k+1, since we know that ak satisfies the explicit formula.
RHS: ak1+3=(3(k1)+1)+3, since we know that ak1 satisfies the explicit formula.
Simplifying, we get ak1+3=3k3+1+3=3k+1.
Thus, the LHS=RHS, hence ak=ak1+3.

Activity 5.5.5.

Prove an=(1)nn!,n0 satisfies the recurrence relationship ak=ak1k,k1, by assuming the sequence is given by an=(1)nn!,n0, and showing ak=ak1k.
To show an explicitly defined sequence satisfies a recurrence relationship always assume the explicit formula and show the recursive one. This can almost always be done with a direct proof.
We can use the recurrence relation for the Fibonacci numbers to prove additional properties.

Activity 5.5.6.

For the Fibonacci sequence, prove Fk2Fk12=FkFk+1Fk+1Fk1 for all k1.
Hint.
Pick whichever side of the equation looks easier to start with. Do some algebra and, where appropriate, use the recursive definition for Fk. If you get stuck, try working with the other side of the equation.

Reading Questions Check Your Understanding

1.

Find the 4th term of the sequence: an=5an14,a1=2.

2.

Find the 4th term of the sequence: an=an1an2,a0=1,a1=2.

3.

Find the 4th term of the sequence: an=n2+n,n1.

4.

Find the 4th term of the sequence: an=n+an1,a1=1.

5.

    Determine if the following sequence is explicitly defined or recursively defined: an=5an14,a1=2.
  • Explicitly defined
  • Recursively defined

6.

    Determine if the following sequence is explicitly defined or recursively defined: an=an1an2,a0=1,a1=2.
  • Explicitly defined
  • Recursively defined

7.

    Determine if the following sequence is explicitly defined or recursively defined: an=n2+n,n1.
  • Explicitly defined
  • Recursively defined

8.

    Determine if the following sequence is explicitly defined or recursively defined: an=n+an1,a1=1.
  • Explicitly defined
  • Recursively defined

9.

Let an=2n+1,n0. Show this sequence satisfies the recurrence relation ak=ak1+2.
Hint.
This is a LHS/RHS proof showing the recurrence relation is true when you assume an=2n+1. In particular, you know ak=2k+1 and ak1=2(k1)+1.

10.

Let an=2n,n0. Show this sequence satisfies the recurrence relation ak=ak1+2.
Hint.
This is a LHS/RHS proof showing the recurrence relation is true when you assume an=2n. In particular, you know ak=2k and ak1=2(k1).

11.

Let an=2n+d,n0. Show this sequence satisfies the recurrence relation ak=ak1+2.
Hint.
This is a LHS/RHS proof showing the recurrence relation is true when you assume an=2n+d. In particular, you know ak=2k+d and ak1=2(k1)+d.

Exercises Exercises

1.

Find the first 4 terms of the sequence defined by
a1=1
ak=ak1+3k,k2.

2.

Find the first 4 terms of the sequence defined by
b0=1,b1=2
bk=bk1+2bk2,k2.

3.

Let a0,a1,a2, be the sequence defined by the formula an=3n+1, for all integers n0. Show that this sequence satisfies the recurrence relation ak=ak1+3 for all integers k1.

4.

Let b0,b1,b2, be the sequence defined by the formula bn=4n, for all integers n0. Show that this sequence satisfies the recurrence relation bk=4bk1 for all integers k1.

5.

Let c0,c1,c2, be the sequence defined by the formula cn=2+n, for all integers n0. Show that this sequence satisfies the recurrence relation
ck=2ck1ck2.

6.

Let F0,F1,F2, be the Fibonacci sequence. Prove that
Fk=3Fk3+2Fk4
for all integers k4.

7.

It turns out that the Fibonacci sequence satisfies the following explicit formula:
Fn=15[(1+52)n+1(152)n+1].
Verify that the sequence defined by this explicit formula satisfies the Fibonacci recurrence relation Fk=Fk1+Fk2 for all integers k2.
You have attempted 1 of 12 activities on this page.