Skip to main content

Section 4.3 Induction and Recursion

Beginning Activity Beginning Activity 1: Recursively Defined Sequences

In a proof by mathematical induction, we “start with a first step” and then prove that we can always go from one step to the next step. We can use this same idea to define a sequence as well. We can think of a sequence as an infinite list of numbers that are indexed by the natural numbers (or some infinite subset of N{0}). We often write a sequence in the following form:

a1,a2,,an,.

The number an is called the n th  term of the sequence. One way to define a sequence is to give a specific formula for the n th  term of the sequence such as an=1n.

Another way to define a sequence is to give a specific definition of the first term (or the first few terms) and then state, in general terms, how to determine an+1 in terms of n and the first n terms a1,a2,,an. This process is known as definition by recursion and is also called a recursive definition. The specific definition of the first term is called the initial condition, and the general definition of an+1 in terms of n and the first n terms a1,a2,,an is called the recurrence relation. (When more than one term is defined explicitly, we say that these are the initial conditions.) For example, we can define a sequence recursively as follows:

b1=16, and for each nN, bn+1=12bn.

Using n=1 and then n=2, we then see that

b2=12b1b3=12b2=1216=128=8=4

1.

Calculate b4 through b10. What seems to be happening to the values of bn as n gets larger?

2.

Define a sequence recursively as follows:

T1=16, and for each nN, Tn+1=16+12Tn.
Then T2=16+12T1=16+8=24. Calculate T3 through T10. What seems to be happening to the values of Tn as n gets larger?

The sequences in Exercise 1 and Exercise 2 can be generalized as follows: Let a and r be real numbers. Define two sequences recursively as follows:

a1=a, and for each nN, an+1=ran.
S1=a, and for each nN, Sn+1=a+rSn.

3.

Determine formulas (in terms of a and r) for a2 through a6. What do you think an is equal to (in terms of a, r, and n)?

4.

Determine formulas (in terms of a and r) for S2 through S6. What do you think Sn is equal to (in terms of a, r, and n)?

In Beginning Activity 1 in Section 4.2, for each natural number n, we defined n!, read n factorial, as the product of the first n natural numbers. We also defined 0! to be equal to 1. Now recursively define a sequence of numbers a0,a1,a2, as follows:

a0=1, and
for each nonnegative integer n, an+1=(n+1)an.

Using n=0, we see that this implies that a1=1a0=11=1. Then using n=1, we see that

a2=2a1=21=2.

5.

Calculate a3,a4,a5, and a6.

6.

Do you think that it is possible to calculate a20 and a100? Explain.

7.

Do you think it is possible to calculate an for any natural number n? Explain.

8.

Compare the values of a0,a1,a2,a3,a4,a5, and a6 with those of 0!,1!,2!,3!,4!,5!, and 6!. What do you observe? We will use mathematical induction to prove a result about this sequence in Exercise 1.

Beginning Activity Beginning Activity 2: The Fibonacci Numbers

The Fibonacci numbers are a sequence of natural numbers f1,f2,f3,,fn, defined recursively as follows:

  • f1=1 and f2=1, and

  • For each natural number n, fn+2=fn+1+fn.

In words, the recursion formula states that for any natural number n with n3, the nth Fibonacci number is the sum of the two previous Fibonacci numbers. So we see that

f3=f2+f1=1+1=2,f4=f3+f2=2+1=3, and f5=f4+f3=3+2=5.

1.

Calculate f6 through f20.

2.

Which of the Fibonacci numbers f1 through f20 are even? Which are multiples of 3?

3.

For n=2, n=3, n=4, and n=5, how is the sum of the first (n1) Fibonacci numbers related to the (n+1)st Fibonacci number?

4.

Record any other observations about the values of the Fibonacci numbers or any patterns that you observe in the sequence of Fibonacci numbers. If necessary, compute more Fibonacci numbers.

Subsection The Fibonacci Numbers

The Fibonacci numbers form a famous sequence in mathematics that was investigated by Leonardo of Pisa (1170 — 1250), who is better known as Fibonacci. Fibonacci introduced this sequence to the Western world as a solution of the following problem:

Suppose that a pair of adult rabbits (one male, one female) produces a pair of rabbits (one male, one female) each month. Also, suppose that newborn rabbits become adults in two months and produce another pair of rabbits. Starting with one adult pair of rabbits, how many pairs of rabbits will be produced each month for one year?

Since we start with one adult pair, there will be one pair produced the first month, and since there is still only one adult pair, one pair will also be produced in the second month (since the new pair produced in the first month is not yet mature). In the third month, two pairs will be produced, one by the original pair and one by the pair which was produced in the first month. In the fourth month, three pairs will be produced, and in the fifth month, five pairs will be produced.

The basic rule is that in a given month after the first two months, the number of adult pairs is the number of adult pairs one month ago plus the number of pairs born two months ago. This is summarized in Table 4.14, where the number of pairs produced is equal to the number of adult pairs, and the number of adult pairs follows the Fibonacci sequence of numbers that we developed in Beginning Activity 2.

Table 4.14. Fibonacci Numbers
Months 1 2 3 4 5 6 7 8 9 10
Adult Pairs 1 1 2 3 5 8 13 21 34 55
Newborn Pairs 1 1 2 3 5 8 13 21 34 55
Month-Old Pairs 0 1 1 2 3 5 8 13 21 34

Historically, it is interesting to note that Indian mathematicians were studying these types of numerical sequences well before Fibonacci. In particular, about fifty years before Fibonacci introduced his sequence, Acharya Hemachandra (sometimes spelled Hemchandra) (1089 — 1173) considered the following problem, which is from the biography of Hemachandra in the MacTutor History of Mathematics Archive 7 .

Suppose we assume that lines are composed of syllables which are either short or long. Suppose also that each long syllable takes twice as long to articulate as a short syllable. A line of length n contains n units where each short syllable is one unit and each long syllable is two units. Clearly a line of length n units takes the same time to articulate regardless of how it is composed. Hemchandra asks: How many different combinations of short and long syllables are possible in a line of length n?

This is an important problem in the Sanskrit language since Sanskrit meters are based on duration rather than on accent as in the English Language. The answer to this question generates a sequence similar to the Fibonacci sequence. Suppose that hn is the number of patterns of syllables of length n. We then see that h1=1 and h2=2. Now let n be a natural number and consider pattern of length n+2. This pattern either ends in a short syllable or a long syllable. If it ends in a short syllable and this syllable is removed, then there is a pattern of length n+1, and there are hn+1 such patterns. Similarly, if it ends in a long syllable and this syllable is removed, then there is a pattern of length n, and there are hn such patterns. From this, we conclude that

hn+2=hn+1+hn.

This actually generates the sequence 1, 2, 3, 5, 8, 13, 21, …. For more information about Hemachandra, see the article “Math for Poets and Drummers” by Rachel Wells Hall in the February 2008 issue of Math Horizons.

We will continue to use the Fibonacci sequence in this book. This sequence may not seem all that important or interesting. However, it turns out that this sequence occurs in nature frequently and has applications in computer science. There is even a scholarly journal, The Fibonacci Quarterly, devoted to the Fibonacci numbers.

The sequence of Fibonacci numbers is one of the most studied sequences in mathematics, due mainly to the many beautiful patterns it contains. Perhaps one observation you made in Beginning Activity 2 is that every third Fibonacci number is even. This can be written as a proposition as follows:

 For each natural number n,f3n is an even natural number .

As with many propositions associated with definitions by recursion, we can prove this using mathematical induction. The first step is to define the appropriate open sentence. For this, we can let P(n) be, “f3n is an even natural number.”

Notice that P(1) is true since f3=2. We now need to prove the inductive step. To do this, we need to prove that for each kN,

if P(k) is true, then P(k+1) is true.
That is, we need to prove that for each kN, if f3k is even, then f3(k+1) is even.

So let's analyze this conditional statement using a know-show table.

Step Know Reason
P f3k is even. Inductive hypothesis
P1 (mN)(f3k=2m) Definition of “even integer”
Q1 (qN)(f3(k+1)=2q)
Q f3(k+1) is even. Definition of “even integer”
Step Show Reason

The key question now is, “Is there any relation between f3(k+1) and f3k?” We can use the recursion formula that defines the Fibonacci sequence to find such a relation.

The recurrence relation for the Fibonacci sequence states that a Fibonacci number (except for the first two) is equal to the sum of the two previous Fibonacci numbers. If we write 3(k+1)=3k+3, then we get f3(k+1)=f3k+3. For f3k+3, the two previous Fibonacci numbers are f3k+2 and f3k+1. This means that

f3k+3=f3k+2+f3k+1.

Using this and continuing to use the Fibonacci relation, we obtain the following:

f3(k+1)=f3k+3=f3k+2+f3k+1=(f3k+1+f3k)+f3k+1.

The preceding equation states that f3(k+1)=2f3k+1+f3k. This equation can be used to complete the proof of the induction step.

Progress Check 4.15. Every Third Fibonacci Number Is Even.

Complete the proof of Proposition 4.16.

Hint.

We have already defined the predicate P(n) to be used in an induction proof and have proved the basis step. Use the information in and after the preceding know-show table to help prove that if f3k is even, then f3(k+1) is even.

Solution.
Proof.

We will use a proof by induction. For each natural number n, we let P(n) be, f3n is an even natural number.

Since f3=2, we see that P(1) is true and this proves the basis step.

For the inductive step, we let k be a natural number and assume that P(k) is true. That is, assume that f3k is an even natural number. This means that there exists an integer m such that

(35)f3k=2m.

We need to prove that P(k+1) is true or that f3(k+1) is even. Notice that 3(k+1)=3k+3 and, hence, f3(k+1)=f3k+3. We can now use the recursion formula for the Fibonacci numbers to conclude that

f3k+3=f3k+2+f3k+1.

Using the recursion formula again, we get f3k+2=f3k+1+f3k. Putting this all together, we see that

f3(k+1)=f3k+3=f3k+2+f3k+1=(f3k+1+f3k)+f3k+1(36)=2f3k+1+f3k

We now substitute the expression for f3k in equation (35) into equation (36). This gives

f3(k+1)=2f3k+1+2mf3(k+1)=2(f3k+1+m)

This preceding equation shows that f3(k+1) is even. Hence it has been proved that if P(k) is true, then P(k+1) is true and the inductive step has been established. By the Principle of Mathematical Induction, this proves that for each natural number n, the Fibonacci number f3n is an even natural number.

Subsection Geometric Sequences and Geometric Series

Let a,rR. The following sequence was introduced in Beginning Activity 1.

Initial condition: a1=aRecurrence relation: For each nN,an+1=ran.

This is a recursive definition for a geometric sequence with initial term a and (common) ratio r. The basic idea is that the next term in the sequence is obtained by multiplying the previous term by the ratio r. The work in Beginning Activity 1 suggests that the following proposition is true.

The proof of this proposition is Exercise 6.

Another sequence that was introduced in Beginning Activity 1 is related to geometric series and is defined as follows:

Initial condition: S1=aRecurrence relation: For each nN,Sn+1=a+rSn.

For each nN, the term Sn is a (finite) geometric series with initial term a and (common) ratio r. The work in Beginning Activity 1 suggests that the following proposition is true.

The proof of Theorem 4.18 is Exercise 7. The recursive definition of a geometric series and Theorem 4.18 give two different ways to look at geometric series. Theorem 4.18 represents a geometric series as the sum of the first n terms of the corresponding geometric sequence. Another way to determine the sum of a geometric series is given in Theorem 4.19, which gives a formula for the sum of a geometric series that does not use a summation.

The proof of Theorem 4.19 is Exercise 8.

Exercises Exercises

1.

For the sequence a0,a1,a2,,an, , assume that a0=1 and that for each nN{0}, an+1=(n+1)an. Use mathematical induction to prove that for each nN{0}, an=n!.

Answer.

Let P(n) be an=n!. Since a0=1 and 0!=1, we see that P(0) is true. For the inductive step, we assume that kN{0} and that P(k) is true or that ak=k!.

ak+1=(k+1)ak=(k+1)k!=(k+1)!.

This proves the inductive step that if P(k) is true, then P(k+1) is true.

2.

Assume that f1,f2,,fn, are the Fibonacci numbers. Prove each of the following:

(a)

For each nN, f4n is a multiple of 3.

Answer.

Let P(n) be, “f4n is a multiple of 3.” Since f4=3, P(1) is true. If P(k) is true, then there exists an integer m such that f4k=3m. We now need to prove that P(k+1) is true or that f4(k+1) is a multiple of 3. We use the following:

f4(k+1)=f4k+4=f4k+3+f4k+2=(f4k+2+f4k+1)+(f4k+1+f4k)=f4k+2+2f4k+1+f4k=(f4k+1+f4k)+2f4k+1+f4k=3f4k+1+2f4k

We now use the assumption that f4k=3m and the last equation to obtain f4(k+1)=3f4k+1+23m and hence, f4(k+1)=3(f4k+1+2m). Therefore, f4(k+1) is a multiple of 3 and this completes the proof of the inductive step.

(b)

For each nN, f5n is a multiple of 5.

(c)

For each nN with n2, f1+f2++fn1=fn+11.

Answer.

Let P(n) be, “f1+f2++fn1=fn+11.” Since f1=f31, P(2) is true. For k2, if P(k) is true, then f1+f2++fk1=fk+11. Then

(f1+f2++fk1)+fk=(fk+11)+fk=(fk+1+fk)1=fk+21.

This proves that if P(k) is true, then P(k+1) is true.

(d)

For each nN, f1+f3++f2n1=f2n.

(e)

For each nN, f2+f4++f2n=f2n+11.

(f)

For each nN, f12+f22++fn2=fnfn+1.

Answer.

Let P(n) be, “f12+f22++fn2=fnfn+1.” For the basis step, we notice that f12=1 and f1f2=1 and hence, P(1) is true. For the inductive step, we need to prove that if P(k) is true, then P(k+1) is true. That is, we need to prove that if f12+f22++fk2=fkfk+1, then f12+f22++fk2+fk+12=fk+1fk+2. To do this, we can use

(f12+f22++fk2)+fk+12=fkfk+1+fk+12f12+f22++fk2+fk+12=fk+1(fk+fk+1)=fk+1fk+2.
(g)

For each nN such that n0(mod3), fn is an odd integer.

4.

The quadratic formula can be used to show that α=1+52 and β=152 are the two real number solutions of the quadratic equation x2x1=0. Notice that this implies that

α2=α+1, and β2=β+1.

It may be surprising to find out that these two irrational numbers are closely related to the Fibonacci numbers.

(a)

Verify that f1=α1β1αβ and that f2=α2β2αβ.

(b)

(This part is optional, but it may help with the induction proof in Task 4.c.) Work with the relation f3=f2+f1 and substitute the expressions for f1 and f2 from Task 4.a Rewrite the expression as a single fraction and then in the numerator use α2+α=α(α+1) and a similar equation involving β. Now prove that f3=α3β3αβ.

(c)

Use induction to prove that for each natural number n, if α=1+52 and β=152, then fn=αnβnαβ.

This formula for the nth Fibonacci number is known as Binet's formula, named after the French mathematician Jacques Binet (1786 — 1856).

5.

Is the following conjecture true or false?

6.

Prove Theorem 4.17. Let a,rR. If a geometric sequence is defined by a1=a and for each nN, an+1=ran, then for each nN, an=arn1.

Answer.

For the inductive step, if ak=ark1, then

ak+1=rak=r(ark1)=ark.

7.

Prove Theorem 4.18. Let a,rR. If the sequence S1,S2,,Sn, is defined by S1=a and for each nN, Sn+1=a+rSn, then for each nN, Sn=a+ar+ar2++arn1. That is, the geometric series Sn is the sum of the first n terms of the corresponding geometric sequence.

8.

Prove Theorem 4.19. Let a,rR and r1. If the sequence S1,S2,,Sn, is defined by S1=a and for each nN, Sn+1=a+rSn, then for each nN, Sn=a(1rn1r).

Answer.

For the inductive step, use the assumption that Sk=a(1rk1r) and the recursive definiton to write Sk+1=a+rSk.

9.

For the sequence a1,a2,,an, , assume that a1=2 and that for each nN, an+1=an+5.

(a)

Calculate a2 through a6.

Answer.

a2=7, a3=12, a4=17, a5=22, a6=27.

(b)

Make a conjecture for a formula for an for each nN.

Answer.

One possibility is: For each nN, an=2+5(n1).

10.

The sequence in Exercise 9 is an example of an arithmetic sequence. An arithmetic sequence is defined recursively as follows:

Let c and d be real numbers. Define the sequence a1,a2,,an, by a1=c and for each nN, an+1=an+d.

(a)

Determine formulas for a3 through a8.

(b)

Make a conjecture for a formula for an for each nN.

11.

For the sequence a1,a2,,an, , assume that a1=1, a2=5, and that for each nN with n2, an+1=an+2an1. Prove that for each natural number n, an=2n+(1)n.

12.

For the sequence a1,a2,,an, , assume that a1=1 and that for each nN, an+1=5+an.

(a)

Calculate, or approximate, a2 through a6.

Answer.

a2=6, a3=6+52.729, a42.780, a52.789, a62.791

(b)

Prove that for each nN, an<3.

Answer.

Let P(n) be, “an<3.” Since a1=1, P(1) is true. For kN, if P(k) is true, then ak<3. Now

ak+1=5+ak.

Since ak<3, this implies that ak+1<8 and hence, ak+1<3. This proves that if P(k) is true, then P(k+1) is true.

13.

For the sequence a1,a2,,an, , assume that a1=1, a2=3, and that for each nN, an+2=3an+12an.

(a)

Calculate a3 through a6.

Answer.

a3=7, a4=15, a5=31, a6=63

(b)

Make a conjecture for a formula for an for each nN.

Hint.

Think in terms of powers of 2.

14.

For the sequence a1,a2,,an, , assume that a1=1, a2=1, and that for each nN, an+2=12(an+1+2an).

(a)

Calculate a3 through a6.

Answer.

a3=32, a4=74, a5=3724, a6=451336

(b)

Prove that for each nN, 1an2.

15.

For the sequence a1,a2,,an,, assume that a1=1, a2=1, a3=1, and for that each natural number n,

an+3=an+2+an+1+an.
(a)

Compute a4, a5, a6, and a7.

(b)

Prove that for each natural number n with n>1, an2n2.

16.

For the sequence a1,a2,,an,, assume that a1=1, and that for each natural number n,

an+1=an+nn!.
(a)

Compute n! for the first 10 natural numbers.

(b)

Compute an for the first 10 natural numbers.

Answer.
a2=5a5=719a8=362879a3=23a6=5039a9=3628799a4=119a7=40319a10=39916799
(c)

Make a conjecture about a formula for an in terms of n that does not involve a summation or a recursion.

17.

For the sequence a1,a2,,an, , assume that a1=1, a2=1, and for each nN, an+2=an+1+3an. Determine which terms in this sequence are divisible by 4 and prove that your answer is correct.

18.

The Lucas numbers are a sequence of natural numbers L1,L2,L3,,Ln,, which are defined recursively as follows:

  • L1=1 and L2=3, and

  • For each natural number n, Ln+2=Ln+1+Ln.

List the first 10 Lucas numbers and the first ten Fibonacci numbers and then prove each of the following propositions. The Second Principle of Mathematical Induction may be needed to prove some of these propositions.

(a)

For each natural number n, Ln=2fn+1fn.

Answer.

Let P(n) be, “Ln=2fn+1fn.” First, verify that P(1) and P(2) are true. Now let k be a natural number with k2 and assume that P(1), P(2), …, P(k) are all true. Since P(k) and P(k1) are both assumed to be true, we can use them to help prove that P(k+1) must then be true as follows:

Lk+1=Lk+Lk1=(2fk+1fk)+(2fkfk1)=2(fk+1+fk)(fk+fk1)=2fk+2fk+1.
(b)

For each nN with n2, 5fn=Ln1+Ln+1.

(c)

For each nN with n3, Ln=fn+2fn2.

19.

There is a formula for the Lucas numbers similar to the formula for the Fibonacci numbers in Exercise 4. Let α=1+52 and β=152. Prove that for each nN, Ln=αn+βn.

20.

Use the result in Exercise 19, previously proven results from Exercise 18, or mathematical induction to prove each of the following results about Lucas numbers and Fibonacci numbers.

(a)

For each nN, Ln=f2nfn.

(b)

For each nN, fn+1=fn+Ln2.

(c)

For each nN, Ln+1=Ln+5fn2.

(d)

For each nN with n2, Ln=fn+1+fn1.

21. Evaluation of Proofs.

See the instructions for Exercise 19 from Section 3.1.

(a)
Proposition

Let fn be the n th  Fibonacci number, and let α be the positive solution of the equation x2=x+1. So α=1+52. For each natural number n, fnαn1.

Proof

We will use a proof by mathematical induction. For each natural number n, we let P(n) be, “fnαn1.

We first note that P(1) is true since f1=1 and α0=1. We also notice that P(2) is true since f2=1 and, hence, f2α1.

We now let k be a natural number with k2 and assume that P(1), P(2), … , P(k) are all true. We now need to prove that P(k+1) is true or that fk+1αk.

Since P(k1) and P(k) are true, we know that fk1αk2 and fkαk1. Therefore,

fk+1=fk+fk1fk+1αk1+αk2fk+1αk2(α+1).

We now use the fact that α+1=α2 and the preceding inequality to obtain

fk+1αk2α2fk+1αk

This proves that if P(1), P(2), … , P(k) are true, then P(k+1) is true. Hence, by the Second Principle of Mathematical Induction, we conclude that for each natural number n, fnαn1.

Activity 25. Compound Interest.

Assume that R dollars is deposited in an account that has an interest rate of i for each compounding period. A compounding period is some specified time period such as a month or a year. For each integer n with n0, let Vn be the amount of money in an account at the end of the nth compounding period. Then

V1=R+iRV2=V1+iV1=R(1+i)=(1+i)V1=(1+i)2R.
(a)

Explain why V3=V2+iV2. Then use the formula for V2 to determine a formula for V3 in terms of i and R.

(b)

Determine a recurrence relation for Vn+1 in terms of i and Vn.

(c)

Write the recurrence relation in Task 25.b so that it is in the form of a recurrence relation for a geometric sequence. What is the initial term of the geometric sequence and what is the common ratio?

Activity 26. The Future Value of an Ordinary Annuity.

For an ordinary annuity, R dollars is deposited in an account at the end of each compounding period. It is assumed that the interest rate, i, per compounding period for the account remains constant. Let St represent the amount in the account at the end of the tth compounding period. St is frequently called the future value of the ordinary annuity. So S1=R. To determine the amount after two months, we first note that the amount after one month will gain interest and grow to (1+i)S1. In addition, a new deposit of R dollars will be made at the end of the second month. So

S2=R+(1+i)S1.
(a)

For each nN, use a similar argument to determine a recurrence relation for Sn+1 in terms of R, i, and Sn.

(b)

By recognizing this as a recursion formula for a geometric series, use Theorem 4.19 to determine a formula for Sn in terms of R, i, and n that does not use a summation. Then show that this formula can be written as

Sn=R((1+i)n1i).
(c)

What is the future value of an ordinary annuity in 20 years if $200 dollars is deposited in an account at the end of each month where the interest rate for the account is 6% per year compounded monthly? What is the amount of interest that has accumulated in this account during the 20 years?

mathshistory.st-andrews.ac.uk/Biographies/Hemchandra