<s>[INST] How to find a matrix $X$ such that $X+X^2+X^3 = \begin{bmatrix} 1&2005\\ 2006&1 \end{bmatrix}$? 
Find a matrix $X \in M_{2}(\mathbb Z)$ such that $$X+X^2+X^3=\begin{bmatrix} 1&2005\\ 2006&1\end{bmatrix}$$

My try: 
Let 
$$X=\begin{bmatrix}
a&b\\
c&d
\end{bmatrix}$$
where $a,b,c,d\in Z$
then
$$X^2=\begin{bmatrix}
a^2+bc&ab+bd\\
ac+cd&bc+d^2
\end{bmatrix}$$
then $$X^3=\begin{bmatrix}
a^3+abc+abc+bcd&a^2b+b^2c+abd+bd^2\\
a^2c+acd+bc^2+cd^2&abc+bcd+bcd+d^3
\end{bmatrix}$$
so
$$X+X^2+X^3=\begin{bmatrix}
a^3+2abc+bcd+a^2+bc+a&a^2b+b^2c+abd+bd^2+ab+bd+b\\
a^2c+acd+bc^2+cd^2+ac+cd+c&abc+2bcd+d^3+bc+d^2+d
\end{bmatrix}$$
then we have
$$\begin{cases}
a^3+2abc+bcd+a^2+bc+a=1\\
a^2b+b^2c+abd+bd^2+ab+bd+b=2005\\
a^2c+acd+bc^2+cd^2+ac+cd+c=2006\\
abc+2bcd+d^3+bc+d^2+d=1
\end{cases}$$
Note $2005=5\cdot 401 $ is prime number,so
$$b(a^2+bc+ad+d^2+a+d+1)=2005$$
we can $b=\pm 1$ ,or $b=\pm 2005$ ,or $b=\pm 5$ or $b=\pm 401$
and note $2006=2\times 1003$
then $c=\pm 2$ ,or $c=\pm 1003$or $c=\pm 1$,or $c=\pm 2006$
so following is very ugly.  But I can't.Thank you ,maybe this problem have other nice methods,Thank you
 [/INST] If an integer matrix solution exists, then with modulo 2 arithmetic and with $X=Y+I$, the equation
$$
(Y+I)+(Y^2+I)+(Y^3+Y^2+Y+I) = \pmatrix{1&1\\ 0&1}
$$
is solvable over $GF(2)$, meaning that
$$
Y^3 = \pmatrix{0&1\\ 0&0}.
$$
But this is impossible because the square of every $2\times2$ nilpotent matrix must vanish. Therefore the matrix equation in the OP's question has no integer matrix solution.
</s>