# [✓] Solve a recurrence relation?

GROUPS:
 I have been having trouble doing reccurence relation problems in my discrete structures class, this is one question I have been struggling on:Solve the reccurence relation an = 3a(n-1)+10a(n-2) with initial terms a0 = 4 and a_1 = 1I need some work to be shown so I can better understand the process! Thanks!
 John Hendrickson 1 Vote In[3]:= RSolve[(a[n] == 3 a[n - 1] + 10 a[n - 2]), a[n], n] Out[3]= {{a[n] -> (-2)^n C[1] + 5^n C[2]}} Mathematica has (as far as I know) the best solver (available) for Recurrence Relations.Without having done any work or thinking on my part: it seems you can use the answer to chooser your two Constants by the rule given. (or do more work to set constants, as the next person did)
 Mariusz Iwaniuk 1 Vote  RSolve[{a[n] == 3 a[n - 1] + 10 a[n - 2], a[0] == 4, a[1] == 1}, a[n], n] (* {{a[n] -> 1/7 (19 (-2)^n + 9 5^n)}} *) For more info see here.