[Math] Prove that $n^2 + n +1$ is not divisible by $5$ for any $n$

elementary-number-theorymodular arithmetic

Prove that $n^2 + n +1$ is not divisible by $5$ for any $n$.

I believe this might be tried using division algorithm, or modular arithmetic. I don't see exactly how to start this… Please help.

Best Answer

$5\nmid (n^2+n+1)$ for all integer $n$. Because $$n^2+n+1 \equiv (n+3)^2 + 2 \pmod 5$$ So if $5\mid (n^2+n+1)$ for some $n$, then $n$ satisfies $(n+3)^2 \equiv 3 \pmod 5$. But $3$ is not quadratic residue modulo $5$. (You can check that $3$ is not quadratic residue easily.)