A recurrence of the form Tn=ATn−1+BTn−2 will have the closed form Tn=axn+byn, where x,y are the values of the starting term that make the sequence geometric, and a,b are the appropriately chosen constants such that those special starting terms linearly combine to form the actual starting terms.
Suppose we have such a recurrence with T1=3 and T2=7. Then T3=ax3+by3=16=7A+3B, and T4=ax4+by4=42=16A+7B.
Solving these simultaneous equations for A and B, we see that A=−14 and B=38. So, ax5+by5=T5=−14(42)+38(16)=020.
Solution 3
Using factoring formulas, the terms can be grouped. First take the first three terms and sum them, getting:
Multiplying out this expression gets the answer term and then a lot of other expressions, which can be eliminated as done in the first solution.
~lpieleanu (reformatting and minor edits)
Solution 4
We first let the answer to this problem be k. Multiplying the first equation by x gives ax2+bxy=3x.
Subtracting this equation from the second equation gives by2−bxy=7−3x. Similarly, doing the same for the other equations, we obtain: by2−bxy=7−3x, by3−bxy2=16−7x, by4−bxy3=42−16x, and by5−bxy4=k−42x
Now lets take the first equation. Multiplying this by y and subtracting this from the second gives us by3−bxy2=(7−3x)y. We can also obtain by4−bxy3=(16−7x)y.
Now we can solve for x and y! (7−3x)y=16−7x and (16−7x)y=42−16x. Solving for x and y gives us (−7+87,−7−87) (It can be switched, but since the given equations are symmetric, it doesn't matter). k−42x=(42−16x)y, and solving for k gives us k=020.