If $A=\begin{bmatrix}2&1&1\\0&1&0\\1&1&2\end{bmatrix}$, find $A^8-5A^7+7A^6-3A^5+A^4-5A^3+8A^2-2A+I$ 
If $A=\begin{bmatrix}2&1&1\\0&1&0\\1&1&2\end{bmatrix}$, find $A^8-5A^7+7A^6-3A^5+A^4-5A^3+8A^2-2A+I$

Attempt $1:$ $A=I+B$, where $B=\begin{bmatrix}1&1&1\\0&0&0\\1&1&1\end{bmatrix}$
$B^n$ comes out to be $2^{n-1}B$
After that I tried doing $A^8=(I+B)^8$ and then opening RHS with binomial. But it didn't help.
Attempt $2:$ Finding characteristic equation and putting $A$ in it. It didn't help either.
The equation I got here is $A^3-5A^2+7A-3I=0$
Note: Concept of minimal polynomial is not in syllabus. Also, if we can do this without characteristic polynomial, that would be great.

We have, $$A=\begin{bmatrix}2&1&1\\0&1&0\\1&1&2\end{bmatrix}$$
According to Caley-Hamilton Theorem,
$$|A - \lambda I| = 0$$
So we have,
$$A - \lambda I = \begin{bmatrix}2&1&1\\0&1&0\\1&1&2\end{bmatrix} - \lambda \begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix} = \begin{bmatrix}2 - \lambda&1&1\\0&1 - \lambda &0\\1&1&2 - \lambda\end{bmatrix}$$
Now,
$$|A - \lambda I|  = 0 $$$$\implies \begin{vmatrix}2 - \lambda&1&1\\0&1 - \lambda &0\\1&1&2 - \lambda\end{vmatrix}  = 0$$$$\implies \lambda^3 - 5\lambda^2 + 7 \lambda - 3 = 0\tag{1}$$
Now, since every matrix is the root of its Eigen matrix, we have:
$$A^3 - 5A^2 + 7A  - 3 = 0 \tag{2}$$
Now consider,
$$A^8-5A^7+7A^6-3A^5+A^4-5A^3+8A^2-2A+I$$
$$ = (A^3- 5A^2  + 7A - 3) (A^5 + A) + (A^2 + A + I) $$
Using equation $(2)$ this equation will be changed into,
$$ (0) (A^5 + A) + (A^2 + A + I) $$
$$ =  (A^2 + A + I)$$
Now put values of $A^2, A$ and $I$, it will be done!

Factorization step:
$$A^8-5A^7+7A^6-3A^5+A^4-5A^3+8A^2-2A+I$$
$$A^5(A^3-5A^2+7A-3) +A^4-5A^3+8A^2-2A+I$$
$$A^5(A^3-5A^2+7A-3) +A^4-5A^3+7A^2 + A^2 - 3A + A+I$$
$$A^5(A^3-5A^2+7A-3) +A^4-5A^3+7A^2- 3A  + A^2 + A+I$$
$$A^5\underbrace{(A^3-5A^2+7A-3)} +A\underbrace{(A^3-5A^2+7A - 3)} + A^2 + A+I$$
$$(A^5 + A)(A^3-5A^2+7A-3) + (A^2 + A+I)$$
