$E:=\begin{pmatrix} 1&0&0&0\\0&1&0&0\\0&0&1&0\\0&0&0&1\end{pmatrix} A:= \begin{pmatrix} 0&1&0&1\\1&0&1&0\\0&0&0&0\\0&0&0&0\end{pmatrix} A^2:= \begin{pmatrix} 1&0&1&0\\0&1&0&1\\0&0&0&0\\0&0&0&0\end{pmatrix}$
My attempt:
The idea is to find a linear combination $lin(E+A+A^2+...+A^n) = A^{n+1}$
I tried it by taking the first column of each matrix and look for a solution:
(1) E|A
$x\begin{pmatrix} 1\\0\\0\\0\end{pmatrix} = \begin{pmatrix} 0\\1\\0\\0\end{pmatrix}$
This can obviously not work
(2) $lin(E+A) = A^2$
$x\begin{pmatrix} 1\\0\\0\\0\end{pmatrix} +y \begin{pmatrix} 0\\1\\0\\0\end{pmatrix} = \begin{pmatrix} 1\\0\\0\\0\end{pmatrix}$
Which works for $x=1, y=0.$
Now the minimalpolynomial should be $0\cdot E+ 1\cdot A + A^2 \rightarrow 0+x+x^2$, but it seems to be wrong in further calculations.