5. Recursion and Iteration
Sign In
4, 3x, 3x+16, 15x+16, 27x+80
a_1&=4 a_2&=3x a_n&=a_(n-1)+4a_(n-2) To do so, we will use a table. To find a_3, we will substitute 3 for n in the above formula. To find a_4, we will substitute 4 for n, and so on.
| n | a_n=a_(n-1)+4a_(n-2) | a_(n-1)+4a_(n-2) | a_n |
|---|---|---|---|
| - | a_1= 4 | - | - |
| - | a_2= 3x | - | - |
| 3 | a_3=a_(3-1)+4a_(3-2) ⇕ a_3=a_2+4a_1 |
a_3= a_2+4 a_1 ⇓ a_3= 3x+4( 4) |
a_3= 3x+16 |
| 4 | a_4=a_(4-1)+4a_(4-2) ⇕ a_4=a_3+4a_2 |
a_4= a_3+4 a_2 ⇓ a_4= 3x+16+4( 3x) |
a_4= 15x+16 |
| 5 | a_5=a_(5-1)+4a_(5-2) ⇕ a_5=a_4+4a_3 |
a_5= a_4+4 a_3 ⇓ a_5= 15x+16+4( 3x+16) |
a_5= 27x+80 |
The first five terms of the sequence are 4, 3x, 3x+16, 15x+16, and 27x+80.