# Problem with solving the recurrence relation $a_n=a_{n-1}+6a_{n-2}+30$ for $n\geq2$, $a_0=0$, $a_1=-10$

My task: $$a_n=a_{n-1}+6a_{n-2}+30$$ for $$n\geq2$$, $$a_0=0$$, $$a_1=-10$$

My solution $$x^{2}-x-6$$

$$\Delta=25$$

$$x1=-2$$

$$x2=3$$

So I am gonna use following formula: $$a_n=ar^{n}+br^{n}$$

$$a_n=a*(-2)^{n}+b*3^{n}$$

$$a_0=0=a+b$$

$$a_1=-10=-2a+3b$$

$$b=-2$$

$$a=2$$

$$a_n=2*(-2)^{n}-2*3^{n}+30$$

I calculate $$a_2$$

$$a_2=-10+0+30=20$$

Which is correct with above formula

$$a_2=2*(-2)^{2}-2*3^{2}+30=20$$

but for $$a_3$$ and above results are not matching, am I doing something wrong here?

The $$+30$$ is the problem. Find $$c$$ such that $$b_n:=a_n+c\implies b_n=b_{n-1}+6b_{n-2}$$, then use your usual techniques.

$$b_n=b_{n-1}-c+6(b_{n-2}-c)+30+c=b_{n-1}+6b_{n-2}+30-6c$$ Set $$c=5$$ so $$b_n=b_{n-1}+6b_{n-2}\implies\exists a,\,b:\,b_n=a(-2)^n+b3^n.$$From $$b_0=5,\,b_1=-5$$, you can find $$a,\,b$$. Then $$a_n=b_n-5$$.

• I don't really get it, could you show me how its supposed to look in my case? That's the best way for me to understand it. – Gorosso Jan 27 '19 at 16:41
• @Gorosso See my edit. – J.G. Jan 27 '19 at 17:15
• Where does c=5 come from? Also what I am supposed to do with $a_n=b_n-5$? – Gorosso Jan 27 '19 at 18:00
• @Gorosso The technique you used originally only works when there isn't a constant in the recursion relation, so I chose $c$ to delete it. Once you have a formula for $b_n$, you have one for $a_n$. – J.G. Jan 27 '19 at 18:14
• Now results are matching, so I guess I did everything according to your tips. But I am having some issue in similar reccurence using your method, could you check it out? math.stackexchange.com/questions/3090006/… – Gorosso Jan 27 '19 at 19:22

Since for all $$n$$ we have $$a_n-a_{n-1}-6a_{n-2}=30$$ we have also

$$a_{n-1}-a_{n-2}-6a_{n-3}=30$$

so $$a_n-a_{n-1}-6a_{n-2}=a_{n-1}-a_{n-2}-6a_{n-3}$$

and thus we get l.r. :

$$a_n-2a_{n-1}-5a_{n-2}+6a_{n-3}=0$$

and so on...