$$ a_{n+2} - 2a_{n+1} - 3a_n = 0 $$
I have this with $a_0=1$ and $a_1=2$.
$$z^{-2}\left[A(z)-a_0-a_1z\right]-2z^{-1}\left[A(z)-a_0\right]-3A(z)=0$$
Then I solve this $A(z)$ and I replace the values $a_0=1$ and $a_1=2$ and I find the result that it is $a_n=1/4(-1)^n+3/4\cdot3^n$ the generator of the function.
What I want is another easier way to calculate this.It needs a lot of time to reach that. Is a calculator or another way easy way to do that? Thanks in advance
$$a_{n+2}-2a_{n+1}-3a_n=0;\;a_0=1,\;a_1=2$$ Characteristic equation is $$x^2-2x-3=0\to x_1=-1;\;x_2=3$$ The general solution is $$a_n=A(-1)^n+B\cdot 3^n$$ Plug initial values $$a_0=A+B=1;\;a_1=-A+3B=2\to A=\frac{1}{4},B=\frac{3}{4}$$ The actual solution is $$a_n=\frac{1}{4}(-1)^n+\frac{3}{4} \cdot 3^n$$ simplified $$a_n=\frac{1}{4} \left((-1)^n+3^{n+1}\right)$$