My solution: since order $2$, then $r^2 - 5r + 6 = 0$. Then $(r - 2 ) (r - 3) = 0$, so $r_1 = 2$ and $r_2 = 3$.
Is it correct? If it's correct, then how can I find the general and unique solution?
My solution: since order $2$, then $r^2 - 5r + 6 = 0$. Then $(r - 2 ) (r - 3) = 0$, so $r_1 = 2$ and $r_2 = 3$.
Is it correct? If it's correct, then how can I find the general and unique solution?
Let $A(z) = \sum_{n=1}^\infty a_nz^n$ be the generating function of $\{a_n\}$. Multiplying both sides of the recurrence by $z^n$ and summing over $n=3$ to infinity, we have $$ \sum_{n=3}^\infty a_nz^n = 5\sum_{n=3}^\infty a_{n-1}z^n -6\sum_{n=3}^\infty a_{n-2}z^n. $$ Some algebraic manipulation yields $$ A(z) -a_1z -a_2z^2 = 5z(A(z)-a_1z) - 6z^2A(z). $$ Solving for $A(z)$, we have $$ A(z) = \frac{15 z^2-2 z}{(1-3z)(1-2z)}. $$ Partial fraction decomposition yields $$ A(z) = \frac{3}{1-3z}-\frac{11}{2 (1-2z)}+\frac{5}{2} $$ Expanding $A(z)$ as a series, we have \begin{align} A(z) &= 3\sum_{n=1}^\infty 3^nz^n - \frac{11}2\sum_{n=1}^\infty 2^nz^n + \frac52\\ &= \sum_{n=1}^\infty (3^{n+1}-11\cdot 2^{n-1})z^n + \frac52, \end{align} so $a_n = 3^{n+1}-11\cdot 2^{n-1}$, $n\geqslant 1$.