Recursive Sequences


We are often interested in predicting future terms in a sequence (beyond those listed), or in developing a rule that describes all the terms in the sequence. It is only possible to do this if there is an observable pattern. This pattern is often described in terms of how each term relates to the previous terms in the sequence. 

Let's begin by identifying a pattern in a given sequence and, assuming that pattern continues, use this pattern to write more terms. 

Example 2

List the next three terms in each sequence:

  1.  \(12,~7,~2,~-3,\dots\)
  2.  \(384,~-192,~96,~-48,~24,\dots\)

Solution — Part A

Since the first four terms have been listed, we need to find \(t_5\), \(t_6\), and \(t_7\).

We notice that the first four terms have a pattern — each term is \(5\) less than the previous term in the sequence.

The sequence starts with 12. Subtracting 5 gives 7. Subtracting 5 gives 2. Subtracting 5 gives negative 3.

If this pattern continues, we need to subtract \(5\) from the fourth term to find the fifth term.

\(\begin{align*}t_5&=t_4-5 \\ &= -3-5 \\ &= -8\end{align*}\)

Similarly, \(t_6=-13\), and \(t_7=-18\). 

So, the next three terms in the sequence are \(-8 \), \(-13\), and \(-18\).

Solution — Part B

Here, the first five terms have been listed. We need to find \(t_6\), \(t_7\), and \(t_8\).

We notice another pattern — this time, each term is obtained by dividing the previous term by \(-2\).

For example, \(-192 = \dfrac{384}{-2}\), \(96=\dfrac{-192}{-2}\), and so on.

The sequence starts with 384. Dividing by negative 2 gives negative 192. Dividing by negative 2 gives 96. Dividing by negative 2 gives negative 48. Dividing by negative 2 gives 24.

So, if this pattern continues, we need to divide the fifth term by \(-2\) to find the sixth term.

 \(\begin{align*} t_6&=\dfrac{t_5}{-2} \\ &= \dfrac{24}{-2} \\ &= -12 \end{align*}\)

Similarly, \(t_7=6\) and \(t_8=-3\).

Thus, the next three terms in the sequence are \(-12\), \(6\), and \(-3\). \(\)

An Unpredictable Sequence

The number that faces up when a six-sided die is rolled repeatedly can be represented by a sequence:

\(3,~4,~6,~3,~5,~4,~1,~5,~1,~3,~5,~2,~3,~1,\dots\)

There is no discernible pattern in these numbers (and in fact, there shouldn't be, since the results of rolling a die should be random). This makes it impossible to predict any future terms in the sequence, or any future results of the die.

For the rest of this lesson, we will only be examining sequences that have predictable patterns. 


Slide Notes

Glossary

All Slides

Recursive Sequences

In a previous example, you may have seen the following sequences.

 

Example 3 — Part A

Represent each sequence using a recursion formula.

  1.  \(12,~7,~2,~-3,\dots\)

 

Example 3 — Part B

Represent each sequence using a recursion formula. ​​​​

  1.  \(384,~-192,~96,~-48,~24,\dots\)

 

Paused Finished
Slide /

Check Your Understanding 2


Slide Notes

Glossary

All Slides

 

Example 4 — Option A

Write a recursion formula for the following sequence: \(2,~3,~5,~9,~17,~33,\dots\)

 

 

Example 4 — Option A Continued

Write a recursion formula for the following sequence: \(2,~3,~5,~9,~17,~33,\dots\)

 

Example 4 — Option B

Write a recursion formula for the following sequence: \(2,~3,~5,~9,~17,~33,\dots\)

 

Example 4 Summary

Write a recursion formula for the following sequence: \(2,~3,~5,~9,~17,~33,\dots\)

Solution

Option A

\(t_1=2\), \(t_n=t_{n-1}+2^{n-2}\) for \(n \ge 2\).

Option B

\(t_1=2\), \(t_n=2t_{n-1}-1\) for \(n \ge 2\).

Paused Finished
Slide /

Example 5

To try to stay awake for an exam, Barney drinks one cappuccino every hour for six hours (achieving the maximum recommended daily amount of caffeine). Each cappuccino contains the same amount of caffeine, and after one hour (i.e., every time he drinks a new cappuccino), some of the previous caffeine remains in his body. 

  1. The sequence \(t_1=75\), \(t_n=75+0.2t_{n-1}\) for \(n=2,~3, \ldots,6\) represents this situation. \(t_n\) represents the amount of caffeine (in mg) in Barney's body after drinking \(n\) cappuccinos. Use the recursion formula to identify how much caffeine is in one cappuccino and the percentage of caffeine that remains in Barney's body after one hour. 
  2. How much caffeine is in Barney's system immediately after each of his six cappuccinos? In other words, determine all six terms in the sequence. 
  3. Represent the sequence as a graph.

Solution — Part A

\(t_1=75\), so after the first cappuccino, there is \(75\) mg of caffeine in Barney's system. This means that each cappuccino must contain \(75\) mg of caffeine. 

In the formula \(t_n=75+0.2t_{n-1}\), the \(75\) represents the \(75\) mg of caffeine that is in his most recent cappuccino.

  • \(t_{n-1}\) represents the amount of caffeine in Barney's system after the previous cappuccino.
  • Since \(0.2t_{n-1}\) represents \(20 \%\) of \(t_{n-1}\), it means that \(20\%\) of the previous caffeine remains in Barney's body after one hour.

Solution — Part B

We can use the recursion formula to generate the six terms in the sequence. 

We are given that \(t_1=75\).

\(t_2=75+0.2t_1\), so we can use \(t_1=75\) to calculate \(t_2\):

\[\begin{align*}t_2&=75+0.2(75) \\ &= 75+15 \\ &= 90\end{align*}\]

Similarly, use \(t_2\) to calculate \(t_3\):

\[\begin{align*} t_3&=75 + 0.2t_2 \\ &= 75+0.2(90) \\ &= 75+18 \\ &= 93 \end{align*}\]

Use \(t_3\) to calculate \(t_4\):

\[\begin{align*} t_4&= 75+0.2t_3 \\ &= 75+0.2(93) \\ &= 75+18.6 \\ &= 93.6 \end{align*}\]

Use \(t_4\) to calculate \(t_5\):

\[\begin{align*} t_5&= 75+0.2t_4 \\ &= 75+0.2(93.6) \\ &= 75+18.72 \\ &= 93.72 \end{align*}\]

Finally, use \(t_5\) to calculate \(t_6\):

\[\begin{align*} t_6&= 75+0.2t_5 \\ &= 75+0.2(93.72) \\ &= 75+18.744 \\ &= 93.744 \end{align*}\]

The sequence is \(75,~90,~93,~93.6,~93.72,~93.744 \).

These numbers represent the amount of caffeine (in mg) in Barney's system immediately after each of his six cappuccinos.

Solution — Part C

Graph \(n\) (the term number, or number of cappuccinos) as the independent variable and \(t_n\) as the dependent variable. Since the only possible values of \(n\) are \(n=1,~2,~3,~4,~5,~6\), we do not join the points on the graph. 

 The points  (1, ‌75), (2, 90), (3, 93), (4, 93.6), (5, 93.72), and (6, 93.744​).

We can see on the graph that the amount of caffeine in Barney's system hits a plateau (where the amount of caffeine remains close to constant). From the numbers in the sequence, we know that this plateau occurs somewhere between \(93.7\) and \(93.8\) mg.

In the previous example, we were able to write the terms of the sequence from the recursion formula. Let's practise this some more. 

Example 6

Write the first five terms of each sequence.

  1.  \(t_1=30\), \(t_n=t_{n-1}-4n\) for \(n \ge 2\)
  2.  \(t_1=9\), \(t_2=-\dfrac13\) and \(t_n=(t_{n-1})(t_{n-2})\) for \(n \ge 3\) \(\)

Solution — Part A

We are given that \(\)\(t_1=30\). 

To calculate \(t_2\), use \(t_1\) and \(n=2\):

\[\begin{align*} t_2&= t_1-4(2) \\ &= 30-8 \\ &= 22 \end{align*}\]

To calculate \(t_3\), use \(t_2\) and \(n=3\):

\[\begin{align*} t_3&= t_2-4(3) \\ &= 22-12 \\ &= 10 \end{align*}\]

To calculate \(t_4\), use \(t_3\) and \(n=4\):

\[\begin{align*} t_4&= t_3-4(4) \\ &= 10-16 \\ &= -6 \end{align*}\]

To calculate \(t_5\), use \(t_4\) and \(n=5\):

\[\begin{align*} t_5&= t_4-4(5) \\ &= -6-20 \\ &= -26 \end{align*}\]

The first five terms are \(30\), \(22\), \(10\), \(-6\), and \(-26\). 

Solution — Part B

Notice that for this sequence, we are given two known terms. This is because \(t_n\) depends on two of the previous terms. \(t_{n-1}\) is the term that precedes \(t_n\), and \(t_{n-2}\) is the term that precedes \(t_{n-1}\). 

We are given both \(t_1=9\) and \(t_2=-\dfrac13\).

To calculate \(t_3\), use \(t_1\) and \(t_2\):

\[\begin{align*} t_3 &= (t_2)(t_1) \\ &= - \dfrac13(9) \\ &= -3 \end{align*}\]

To calculate \(t_4\), use \(t_2\) and \(t_3\):

\[\begin{align*} t_4 &= (t_3)(t_2) \\ &= -3 \left(-\dfrac13\right) \\ &= 1 \end{align*}\]

To calculate \(t_5\), use \(t_3\) and \(t_4\)

\[\begin{align*} t_5 &= (t_4)(t_3) \\ &= 1(-3) \\ &= -3 \end{align*}\]

The first five terms are \(9\), \(-\dfrac13\), \(-3\), \(1\), and \(-3\). 


Check Your Understanding 3


Given \(t_1=8,~t_2=7,\) and \(t_n=t_{n-1}-t_{n-2}\) for \(n \ge 3\), find \(t_3,~t_4,\) and \(t_5\).

\(t_3=\)

\(t_4=\)

\(t_5=\)

Next, let's look at some more sequences that depend on two preceding terms, including the famous Fibonacci sequence.

Example 7

The Fibonacci sequence begins with the terms \(\)\(1,~1,~2,~3,~5,~8,~13, \dots\).

  1. Determine the next three terms in the sequence.
  2. Write a recursion formula for the sequence. 

Solution — Part A

We are given the first seven terms. So we need to find \(t_8\), \(t_9\), and \(t_{10}\).

You may have noticed that each term is the sum of the two preceding terms. So term \(8\) can be calculated by adding term \(6\) and term \(7\), and so on. 

\(\begin{align*} t_8 &= t_7+t_6 \\ &= 13+8 \\ &= 21 \end{align*}\)

\(\begin{align*} t_9 &= t_8 +t_7 \\ &= 21+13 \\ &= 34 \end{align*}\)

\(\begin{align*} t_{10} &= t_9 +t_8 \\ &= 34+21 \\ &= 55 \end{align*}\)

Therefore, the next three terms in the sequence are \(21\), \(34\), and \(55\).

Solution — Part B

The two terms that precede \(t_n\) are \(t_{n-1}\) and \(t_{n-2}\).

So in the Fibonacci sequence, \(t_n=t_{n-1}+t_{n-2}\).

Since each term depends on two preceding terms, the recursive formula needs to include two known terms (\(t_1\) and \(t_2\)).

Therefore, the Fibonacci sequence is defined recursively as \(t_1=1\), \(t_2=1\), \(t_n=t_{n-1}+t_{n-2}\) for \(n \ge 3\). 

The Fibonacci sequence has a lot of interesting applications, and its numbers show up in many different contexts. 

Math in Action

The numbers found in the Fibonacci sequence (called Fibonacci numbers) are often found in nature. The number of petals on many types of flowers is a Fibonacci number, as is the number of spirals on pinecones, sunflowers, and parts of many other types of plants. 

One of the flowers below has \(5\) petals, while the other has \(21\). Both of these numbers are found in the Fibonacci sequence.

A flower with 5 petals

A daisy with 21 petals.

It is so difficult to find a four-leaf clover since most clovers have three leaves — also a number in the Fibonacci sequence.

Lots of green clovers

In one direction, this pinecone has eight spirals, while in the other there are thirteen spirals — more Fibonacci numbers!

Pine cone with 13 spirals

Pine cone with 8 spirals

Did You Know?

Try calculating the ratio of consecutive numbers in the Fibonacci sequence, \(\dfrac{t_n}{t_{n-1}}\). As the term number increases, this ratio gets closer and closer to what is known as the Golden Ratio

The Golden Ratio is denoted by the Greek letter \(\phi\) (pronounced "phi", which rhymes with "fly"). It is equal to \(\dfrac{1+ \sqrt5}2\), or approximately \(1.618\). Some artists and architects have purposely used this ratio in their work, believing that it produces objects that are pleasing to the eye (such as a rectangle where the ratio of its length to its width is close to the Golden Ratio). 


Slide Notes

Glossary

All Slides

Try This Revisited

A sequence of numbers is defined as follows:

Try This Revisited Continued

What is the \(100\)th term in this sequence? 

Solution

Recursion Formula: \(t_1=5\), \(t_2=-7\), \(t_n=t_{n-1}-t_{n-2}\) 

Try This Revisited Continued

What is the \(100\)th term in this sequence? 

Solution

The sequence is:  \(5,-7,-12,-5,~7,~12,~5,~-7,-12,-5,~7,~12,\dots\)

Paused Finished
Slide /