5. Recursion and Iteration
Sign In
2, x+3, x+15, 7x+33, 13x+123
a_1&=2 a_2&=x+3 a_n&=a_(n-1)+6a_(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)+6a_(n-2) | a_(n-1)+6a_(n-2) | a_n |
|---|---|---|---|
| - | a_1= 2 | - | - |
| - | a_2= x+3 | - | - |
| 3 | a_3=a_(3-1)+6a_(3-2) ⇕ a_3=a_2+6a_1 |
a_3= a_2+6 a_1 ⇓ a_3= x+3+6( 2) |
a_3= x+15 |
| 4 | a_4=a_(4-1)+6a_(4-2) ⇕ a_4=a_3+6a_2 |
a_4= a_3+6 a_2 ⇓ a_4= x+15+6( x+3) |
a_4= 7x+33 |
| 5 | a_5=a_(5-1)+6a_(5-2) ⇕ a_5=a_4+6a_3 |
a_5= a_4+6 a_3 ⇓ a_5= 7x+33+6( x+15) |
a_5= 13x+123 |
The first five terms of the sequence are 2, x+3, x+15, 7x+33, and 13x+123.