For the following matrix $$A= \begin{bmatrix} 0 & 1 & 0\\ 1 & 0 & 1\\ 0 & 1 & 1 \end{bmatrix} $$ I need to use the Cayley-Hamilton theorem to calculate $(A+I_3)^{10}(A-I_3)^2+A$
First I try writing the characteristic polynomial $f(t)=\det(A-tI_3)=-t^3+t^2+2t-1$. Then, by using Caylely-Hamilton, I have that $f(A)=O_3$, that is, $$-A^3+A^2+2A-I_3=O_3$$ $$A^3-A^2-2A+I_3=O_3$$ I decompose the previous expression and I get that $$(A+I_3)(A-I_3)^2=A$$ Now I replace the last expression in the initial expression $(A+I_3)^{10}(A-I_3)^2+A$ and get $$(A+I_3)^9(A+I_3)(A-I_3)^2+A=$$ $$=(A+I_3)^9A+A$$
Now what should the next step be?
Hint: The result is a matrix with integer coeffcients, namely $$ \begin{pmatrix} 2070 & 3722 & 4631 \cr 3722 & 6701 & 8353 \cr 4631 & 8353 & 10423 \end{pmatrix} $$ So you need to evaluate at a certain point.