Processing math: 97%
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

4.3: Induction and Recursion

( \newcommand{\kernel}{\mathrm{null}\,}\)

Preview Activity 4.3.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 nth term of the sequence. One way to define a sequence is to give a specific formula for the nth 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=12b1             b3=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. Caluculate T3 through T10. What seems to be happening to the values of Tn as n gets larger?

The sequences in Parts (1) and (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.

  1. 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)?
  2. Determine formulas (in terms of a and r) for S2 through S6. What do you think an is equal to (in terms of a, r, and n)?

    In Preview Activity 4.3.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.
  3. Calculate a3, a4, a5 and a6.
  4. Do you think that it is possible to calculate a20 and a100? Explain.
  5. Do you think it is possible to calculate an for any natural number n? Explain.
  6. 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).
Preview Activity 4.3.1: 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, andf5=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.

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.1, 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 Preview Activity 4.3.2.

Table 4.1: 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 (1089 – 1173) considered the following problem, which is from the biography of Hemachandra in the MacTutor History of Mathematics Archive:

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 Preview Activity 4.3.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 f3n=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 fk?” 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.12 (Every Third Fibonacci Number Is Even)

Complete the proof of Proposition 4.13.

Proposition 4.13.

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

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.

Answer

Add texts here. Do not delete this text first.

Geometric Sequences and Geometric Series

Let a, rR. The following sequence was introduced in Preview Activity 4.3.1.

Initial condition:a1=a.Recurrence 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 Preview Activity 4.3.1 suggests that the following proposition is true.

Theorem 4.14

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.

Proof

The proof of this proposition is Exercise (6).

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

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

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

Theorem 4.15

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.

Proof

Add proof here and it will automatically be hidden if you have a "AutoNum" template active on the page.

The proof of Proposition 4.15 is Exercise (7). The recursive definition of a geometric series and Proposition 4.15 give two different ways to look at geometric series. Proposition 4.15 represents a geometric series as the sum of the first nterms of the corresponding geometric sequence. Another way to determine this sum a geometric series is given in Theorem 4.16, which gives a formula for the sum of a geometric series that does not use a summation.

Theorem 4.16

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).

Proof

The proof of Proposition 4.16 is Exercise (8).

Exercises for Section 4.3
  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!.
  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.
    (b) For each nN, f5n is a multiple of 5.
    (c) For each nN, with n2, f1+f2++fn1=fn+11.
    (d) For each nN, f1+f3++f2n1=f2n.
    (e) For each nN, f2+f4++f2n=f2n+11.
    (f) For each nN, f21+f22++f2n=fnfn+1.
    (g) For each nN such that n0 (mod 3), fn is an odd integer.
  3. Use the result in Part (f) of Exercise (2) to prove that
    f21+f22++f2n+f2n+1f21+f22++f2n=1+fn+1fn
  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 part (c).) Work with the relation f3=f2+f1 and substitute the expressions for f1 and f2 from part (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αβ. Note: 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? Justify your conclusion.

    Conjecture. Let f1,f2,...,fm,... be the sequence of the Fibonacci numbers. For each natural number n, the numbers fnfn+3, 2fn+1fn+2, and (f2n+1+f2n+2) form a Pythagorean triple.
  6. Prove Proposition 4.14. 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.
  7. Prove Proposition 4.15. 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 Proposition 4.16. 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).
  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.
    (b) Make a conjecture for a formula for an for each n for each nN.
    (c) Prove that your conjecture in Exercise (9b) is correct.
  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 n for each nN.
    (c) Prove that your conjecture in Exercise (10b) is correct.
  11. For the sequence a1,a2,...,an,..., assume that a1=1, a2=5, and that for each nN, 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.
    (b) Prove that for each nN, an<3.
  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.
    (b) Make a conjecture for a formula for an for each n for each nN.
    (c) Prove that your conjecture in Exercise (13b) is correct.
  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.
    (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 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.
    (c) Make a conjecture about a formula for an in terms of n that does not involve a summation or a recursion.
    (d) Prove your conjecture in Part (c).
  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:

    bullet L1=1 and L2=3, and
    bullet 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.
    (b) For each nN with n2, 5fn=Ln1+Ln+1.
    (c) For each nN with n3, Ln=fn+1fn2.
  19. There is a formula for the Lucas number 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) on page 100 from Section 3.1.
    (a)

    Let fn be the nth 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,

    \[\begin{array} {rcl} {f_{k + 1}} &= & {f_k + f_{k - 1}} \\ {f_{k + 1}} &\le & {\alpha ^{k - 1} + {\alpha ^{k - 2}} \\ {f_{k + 1}} &\le & {\alpha ^{k - 2} (\alpha + 1).} \end{array}\]

    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 or each natural number n, fnαn1.

    Explorations and Activities
  22. 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+iR           V2=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 Part (22b) 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?
    (d) Use Proposition 4.14 to determine a formula for Vn in terms of I, R, and n.
  23. 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. S_t is frequently called the future value of the ordinary annuity.

    So S_1 = 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)S_1. In addition, a new deposit of R dollars will be made at the end of the second month. So
    S_2 = R + (1 + i)S_1

    (a) For each n \in \mathbb{N}, use a similar argument to determine a recurrence relation for S_{n + 1} in terms of R, i, and S_n.
    (b) By recognizing this as a recursion formula for a geometric series, use Proposition 4.16 to determine a formula for S_n in terms of R, i, and n that does not use a summation. Then show that this formula can be written as
    S_n = R(\dfrac{(1 + i)^n - 1}{i}).
    (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?

Answer

Add texts here. Do not delete this text first.


This page titled 4.3: Induction and Recursion is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Ted Sundstrom (ScholarWorks @Grand Valley State University) via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?