5. Recursion and Iteration
Sign In
| n | a_n |
|---|---|
| 1 | 20 000 |
| 2 | 41 600 |
| 3 | 64 928 |
| 4 | 90 122.24 |
| 5 | 117 332.02 |
| 6 | 146 718.58 |
| 7 | 178 456.07 |
| 8 | 212 732.55 |
Let's analyze how much money there will be after n years, a_n, for n> 1, in terms of a_(n-1). The balance at the end of the (n-1)^(th) year is a_(n-1). First we add interest, 0.08a_(n-1). Then, we add 20 000 dollars. Therefore, we get the following equation. a_n= a_(n-1)+ 0.08a_(n-1)+20 000 ⇓ a_n=1.08a_(n-1)+20 000 Finally, we can write a recursive formula for a_n. Recursive Rule: a_1=20 000, a_n=1.08a_(n-1)+20 000forn>1
| n | a_n=1.08a_(n-1)+20 000 | 1.08a_(n-1)+20 000 | a_n |
|---|---|---|---|
| 1 | a_1=20 000 | -- | a_1= 20 000 |
| 2 | 1.08a_1+20 000 | 1.08( 20 000)+20 000 | a_2= 41 600 |
| 3 | 1.08a_2+20 000 | 1.08( 41 600)+20 000 | a_3= 64 928 |
| 4 | 1.08a_3+20 000 | 1.08( 64 928)+20 000 | a_4=90 122.24 |
| 5 | 1.08a_4+20 000 | 1.08(90 122.24)+20 000 | a_5=117 332.02 |
| 6 | 1.08a_5+20 000 | 1.08(117 332.02)+20 000 | a_6= 146 718.58 |
| 7 | 1.08a_6+20 000 | 1.08( 146 718.58)+20 000 | a_7= 178 456.07 |
| 8 | 1.08a_7+20 000 | 1.08( 178 456.07)+20 000 | a_8=212 732.55 |
=Round((1.08)*(A1)+20000,2)in cell A2. When we hit enter, we will get the following.
| n | a_n |
|---|---|
| 1 | 20 000 |
| 2 | 41 600 |
| 3 | 64 928 |
| 4 | 90 122.24 |
| 5 | 117 332.02 |
| 6 | 146 718.58 |
| 7 | 178 456.07 |
| 8 | 212 732.55 |