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