Artificial intelligent assistant

$5 \mid k(k^2 +1)(k-1)^2 \implies k\not\equiv 4$ mod $5$ Note that $k$ is the valency of a graph. In the textbook _Algebraic Graph Theory_ (Godsil & Royle) it mentions (at the tail-end of an exercise) that $5 \mid k(k^2 +1)(k-1)^2 \implies k\not\equiv 4$ mod $5$. The main part of the exercise is to show that $5 \mid k(k^2 +1)(k-1)^2$, which I can show, but I don't see how that leads me to $k\not\equiv 4$ mod $5$. Any hints/help would be greatly appreciated.

If $k \equiv 4 \pmod{5}$, then \begin{align*} k-1 &\equiv 3 \pmod{5}\\\ (k-1)^2 &\equiv 4 \pmod{5}\\\ \end{align*} Likewise $k^2+1 \equiv 2 \pmod{5}$ Thus $$k(k-1)^2(k^2+1) \equiv 4 \cdot 4 \cdot 2 \equiv 2 \pmod{5}.$$

This contradicts the fact that the given expression is divisible by $5$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 470e5998327bde1c962613ba6d5b4dec