# Use Fermat's little theorem to find the roots of $2x^{219}+3x^{74}+2x^{57}+3x^{44}$ in $\mathbb{Z}_5$

The solution says $2x^{219}+3x^{74}+2x^{57}+3x^{44}=_52x^3+3x^2+2x^1+3x^0$ but I don't see how they arrived at that, even with Fermat's theorem

• That is not quite right. There is the obvious solution $x\equiv 0\pmod{5}$. For the rest, divide by $x^{44}$, and then use $x^4\equiv 1\pmod{5}$. Nov 26, 2015 at 21:58
• By the way, the solution is wrong if it says absolute equality, since it isn't true for $x= 0$. For $x\neq 0$ it is true. Nov 26, 2015 at 22:04
• As a side note, while the functions $a\to a^5$ and $a\to a$ are the same over $\Bbb Z_5$, the polynomials $x^5$ and $x$ are not. It's a small subtlety that polynomials aren't in general given by their evaluations. Took me a while to get used to when I got started with abstract algebra. Nov 26, 2015 at 22:13

$5$ is prime, thus by Fermat's theorem $a^4 \equiv 1 (\text{mod } 5)$ for all $a \in \mathbb{Z}_5$, such that $a \neq 0$. Therefore you can reduce any power of $x$ to its remainder after the division by $4$.
For the first coefficient we have then $$2x^{219} = 2\cdot (x^4)^{54}\cdot x^3 = 2\cdot 1 \cdot x^3.$$
And as pointed out by André Nicolas, solving the case $a = 0$ aside we can easily see, that it is also a root.
$\forall$ prime $P$, and $\forall$ $a\in \mathbb Z$, $a<P$, Fermat's theorem says that $a^{(P-1)} \equiv 1 (mod P)$ Here $5$ is Prime and hence each power can be reduced to a power less than $5$ because obviously the solution belongs to $\mathbb Z_5$