hard olympiad level matrix problem 
Let a matrix $A\in\Bbb M_n(R) $,  $n>2$ for which exists a number  $a\in\Bbb [-2,2 ]$ so that :
$A^2 -aA + I_n = O_n$


Prove that for any natural number $m\in\Bbb N$ there exists a unique $a_m\in\Bbb [-2 , 2 ]$ for which $A^{2m}-a_mA^m + I_n = O_n$.

How I tried solving it : I've written $A^2 = aA - I_n$ from which I generalized $A^n$ as the following series :
$A^n = x_nA - x_{n-1}I_n$             where $x_1 = 1$ and $x_2 = a$ and where $x_{n+1} = ax_n - x_{n-1}$  after which i applied the characteristic equation and got :
$r^2-ar=1=0$ so naturally $r_{1,2}=\frac{a\pm i\sqrt{4-a^2}}{2}$
We can write $r_{1,2} = \cos{t} \pm i\sin{t}$ where :
$\sin{t} = \frac{\sqrt{4-a^2}}{2}$ , $\cos{t} = \frac{a}{2}$ and  $t\in [0,\pi]$
so $x_n = C_1\cos{nt} + C_2\sin{nt}$ where if we replace $n$ with $1$ and $2$ and solve the system we get
$C_1= 0$ and $C_2= \frac{2}{\sqrt{4-a_2} }$ so we easily get $x_n = \frac{2}{\sqrt{4-a_2} }\sin{nt}$
so $A^n = \frac{2}{\sqrt{4-a_2} }$ $[\sin{nt} A - \sin{(n-1)t} I_n]$
Furthermore we have that $A^2 -aA = I_n$ so $A(aI_n-A) = I_n$ so $\det{A}$ can't be equal to $0$
so we pretty much know the value of $A^{-n}$, can someone help me proceed ?
I've tried to calculate $A^m + A^{-m}$ and got $a_mI_n$ as an answer, if this enough to prove the statement correct ? And if it isn't i could really use a hand here.
 A: Well you have done most of the important  work for this problem here and since you have the explicit formula for the sequence $x_n$ it is relatively easy to see that
$$A^{2n}-a_nA^n=(x_{2n}-x_n a_n)A-(x_{2n-1}-a_{n}x_{n-1})I_n$$
The only way to have the RHS=$-I_n$ if $(A, I_n)$ are linearly independent is to demand that $a_n=x_{2n}/x_n=2\cos nt$, which leaves us to check that $x_{2n-1}x_n-x_{n-1}x_{2n}=x_n$.
Indeed, using formulas for the sum and difference of angles repeatedly
$$\sin^2 t(x_{2n-1}x_n-x_{n-1}x_{2n})=-\frac{\cos(n+1)t-\cos(n-1)t}{2}=\sin(nt)\sin t$$
and this concludes the check since $x_n=\sin nt/\sin t$.
Now, if we assume that they linearly dependent, some quick algebra reveals that $A=kI_n, k\in \mathbb{R}$ is only possible when
$k=r_{1,2}\in \mathbb{R}\Rightarrow a=\pm 2 , k=1$
In this case it is trivial to see that
$$A^{2n}-2 A^n=-I_n$$
and therefore the required sequence exists in this case too, $a_n=2$.
A: Because $A$ is invertible, you can likewise conclude from the recurrence relation that
$$A^{-m} = \frac{ \sin -mt \times A - \sin (-m-1)t }{\sin t }\times I_n.$$

 If you don't want to take this at face value, set up $ A^{-2} = a A^{-1}  - I_n$ and proceed as you did.
 Just be careful of the signs and values of $t'$.
 Note that $ \frac{2}{\sqrt{4-a^2} } = \frac{1}{\sin t}$.

Thus, $ A^m + A^{-m} = \frac{\sin (m+1)t - \sin (m-1) t}{\sin t} \times I_n  =  2 \sin mt \times I_n.  $
So, for $ a_m = 2 \sin mt \in [2, -2]$, we have $A^{2m} - a_m A^m + I_n = 0. $

Uniqueness follows since $ A^m \neq 0$ (as $ \det A \neq 0 $).
