Show that the equation $\displaystyle x^{129}+x+2=0$ has precisely three solutions in the commutative ring $\displaystyle Z_{256}$.
The multiplicative group of units of that ring is $\displaystyle U:=U(\mathbb{Z}_{256})$ whose order is $\displaystyle \phi(256=2^8)=2^7=128\Longrightarrow u^{128}=1\,\,\,\forall\,u\in U$
$\displaystyle \Longrightarrow \,\forall x\in U\,,\,\,x^{129}+x+2=2x+2=2(x+1)=0\!\!\!\pmod {256}$ $\displaystyle \iff x=-1\!\!\!\pmod{256}$ or $\displaystyle x+1=128\!\!\!\pmod {256}\iff x=127,\,255\!\!\!\pmod{256}$ , and
these are the only solutions with $\displaystyle x\in U$
No, if $\displaystyle x=2k\notin U$ is a solution then $\displaystyle x^{129}+x+2=2^{129}k^{129}+2k+2=\left(2^8\right)^{ 16}\cdot 2k^{129}+2k+2$ $\displaystyle =2(k+1)=0\!\!\!\pmod {256}\iff k+1=128\iff k=127$ and
then $\displaystyle x=254$.
Tonio