# 3.8: Recursive Definitions

- Page ID
- 9826

Recursion occurs in programming when a subroutine is defined—or at least partially defined—in terms of itself. But recursion also occurs outside of programming. A recurs- ive definition is a definition that includes a reference to the term that is being defined. A recursive definition defines something at least partially in terms of itself. As in the case of recursive subroutines, mathematical induction can often be used to prove facts about things that are defined recursively.

As I already noted, there is a recursive definition for *n*!, for *n *in N, and we can use this definition to prove facts about the factorials. We can define 0! = 1 and *n*! = *n *· (*n *− 1)!for *n *> 0. Do you see how the base case and the inductive case in an inductive proof can correspond to the two parts of the recursive definition?

Other sequences of numbers can also be defined recursively. For example, the famous Fibonacci sequence is the sequence of numbers \(f_{0}, f_{1}, f_{2}, \ldots,\) defined recursively by

\(f_{0}=0\)

\(f_{1}=1\)

\(f_{n}=f_{n-1}+f_{n-2} \qquad\) for \(n>1\)

Using this definition, we compute that

\(f_{2}=f_{1}+f_{0}=0+1=1\)

\(f_{3}=f_{2}+f_{1}=1+1=2\)

\(f_{4}=f_{3}+f_{2}=2+1=3\)

\(f_{5}=f_{4}+f_{3}=3+2=5\)

\(f_{6}=f_{5}+f_{4}=5+3=8\)

\(f_{7}=f_{6}+f_{5}=8+5=13\)

and so on. Based on this definition, we can use induction to prove facts about the Fibonacci sequence. We can prove, for example, that \(f_{n}\) grows exponentially with \(n,\) even without finding an exact formula for \(f_{n} :\)

Theorem 3.14.

The Fibonaccisequence, \(f_{0}, f_{1}, f_{2}, \ldots,\) satisfies \(f_{n}>\left(\frac{3}{2}\right)^{n-1},\) for \(n \geq 6\)

*Proof*. We prove this by induction on \(n .\) For \(n=6,\) we have that \(f_{n}=8\) while \(1.5^{n-1}=\) \(1.5^{5},\) which is about \(7.6 .\) So \(f_{n}>1.5^{n-1}\) for \(n=6 .\) Similarly, for \(n=7,\) we have \(f_{n}=13\)and \(1.5^{n-1}=1.5^{6},\) which is about \(11.4 .\) So \(f_{n}>1.5^{n-1}\) for \(n=7\)

Now suppose that *k *is an arbitrary integer with *k *> 7. Suppose that we already know that \(f_{n}>1.5^{n-1}\) for \(n=k-1\) and for \(n=k-2 .\) We want to show that the inequality then holds for *n *= *k *as well. But

\(f_{k}=f_{k-1}+f_{k-2}\)

\(>1.5^{(k-1)-1}+1.5^{(k-2)-1}\) (by the induction hypothesis)

\(=1.5^{k-2}+1.5^{k-3}\)

\(=(1.5) \cdot\left(1.5^{k-3}\right)+\left(1.5^{k-3}\right)\)

\(=(2.5) \cdot\left(1.5^{k-3}\right)\)

\(>\left(1.5^{2}\right) \cdot\left(1.5^{k-3}\right)\) \(\left(\text { since } 1.5^{2}=2.25\right)\)

\(=1.5^{k-1}\)

This string of equalities and inequalities shows that \(f_{k}>1.5^{k-1} .\) This completes the induction and proves the theorem.

**Exercises**

1. Prove that the Fibonacci sequence, \(f_{0}, f_{1}, f_{2}, \dots,\) satisfies \(f_{n}<2^{n}\) for all natural numbers \(n \geq 1\)

2. Suppose that \(a_{1}, a_{2}, a_{3}, \ldots,\) is a sequence of numbers which is defined recursively by \(a_{1}=1\) and \(a_{n}=2 a_{n-1}+2^{n-1}\) for \(n>1 .\) Prove that \(a_{n}=n 2^{n-1}\) for every positive integer \(n\)