<s>[INST] solve the recurrence relation $h_n - 0h_{n - 1} - 3h_{n - 2} + 2h_{n - 3}= 0$ $h_n - 0h_{n - 1} - 3h_{n - 2} + 2h_{n - 3}= 0$
$h_0=2, h_1=0, h_2=7$, and n≥3
is given
here is what I did
$x^3-3x+2=0$
$h_n=a1^n+b(-2)^n$
roots of the polynomial are 1 and -2 but there are 3 equations($h_0,h_1,h_2$) and 2 variables so we need 3 three roots. what is the third root? how do you solve this type of recurrences?
 [/INST] What you did is correct.
The characteristic equation is
$ x^3 - 3 x + 2 = 0 $
By inspection, one of the roots is $x = 1 $.  By synthetic division,
$ (x^3 - 3 x + 2) = (x - 1) (x^2 + x - 2) = (x - 1)^2 (x + 2) $
So the roots are $ 1, 1, -2 $
Therefore, the solution to this homogeneous difference equation is
$ h_n = A + B n + C (-2)^n $
From the initial conditions $h_0, h_1, h_2$ the constants $A,B,C$ can be computed.
We have
$h_0 = 2 = A + C $
$ h_1 = 0 = A + B - 2 C $
$ h_2 = 7 = A + 2 B + 4 C $
And these equations solve to $ A = B = C = 1 $
Hence, the sequence is
$ h_n = 1 + n + (-2)^n $
</s>