Let A = \begin{bmatrix} 0 & 1 & 0\\ 0 & 0 & 1\\ -1 & -1 &-1\\ \end{bmatrix}
Compute $A^{10000} + A^{9998}$
I know this should be done by the Cayley-Hamilton theorem. I get as characteristic polynomial $-A^3 - A^2 - A - I = 0$ but I don't see how to calculate $A^{10000} + A^{9998}$ from there. I hope someone can help me out!