What is the general solution to the recurrence: $x(n + 2) = 6x(n + 1) - 9x(n)$ for $n \geq 0$; with $x(0) = 0; x(1) = 1$?
Solution. The first few values of $x(n)$ are $0,1,6,27,...$ The auxiliary equation for the recurrence is $r^2-6r+9$ which factors as $(r-3)^2$. Thus, we have repeated roots so that the general solution to the recurrence will have the form $x(n) = c_13^n + c_2n3^n$. Substituting the values $n = 0$ and $n = 1$ gives us $x(0) = 0 = c_1$ and $x(1) = 1 = 0 + c_2\cdot3$. Thus, $c_1=1/3$ and $x(n) = nc^{n-1}$.
What doesn't make sense to me is why they added the additional $n$ in $c_2n3^n$ to get $x(n) = c_13^n + c_2n3^n$. When I did it myself I only got $x(n) = c_13^n$. Also why is the answer $x(n) = nc^{n-1}$, when I got $x(n)=(1/3)n3^n$ or $x(n)=n3^{n-1}$ ?