I am trying to solve recurrence relation : $$z_n = 2z_{n-1} + z_{n-2} \;\;\;\;\;z_0=1\;\;\;z_1=3$$
Could you please help to provide a solution. I got stuck with Lamdas..
Are there some simple methods to solve any kind of these problems perhaps ? Like a good cookbook ?
Thanks
the solution is $$z_n=C_1\lambda_1^n+C_2\lambda_2^n$$ $C_1,C_2$ are constants they can calculated by the initial conditions, $\lambda_1$ and $\lambda_2$ are the roots of the equation $$\lambda^2=2\lambda+1$$ see also here https://users.cs.duke.edu/~reif/courses/alglectures/skiena.lectures/lecture3.pdf