I am having trouble figuring out how to prove this:
If $p$ is a prime not equal to $2$ nor $5$, and $n$ is any integer, show that $p$ must be of the form $5k+1$ or $5k+4$ if $p \mid (n^2 - 5)$.
Any help is greatly appreciated!
I am having trouble figuring out how to prove this:
If $p$ is a prime not equal to $2$ nor $5$, and $n$ is any integer, show that $p$ must be of the form $5k+1$ or $5k+4$ if $p \mid (n^2 - 5)$.
Any help is greatly appreciated!
Using Legendre Symbol and Quadratic Reciprocity Theorem,
$p\mid(n^2-5)\iff n^2\equiv5\pmod p\implies \left(\frac5p\right)=1$
$\left(\frac p5\right)\left(\frac5p\right)=(-1)^{\frac{p-1}2\frac{5-1}2}=1$ for odd prime $n$
So, $\left(\frac5p\right)=\left(\frac p5\right)$
Now, $(5k\pm1)^2\equiv1\pmod 5, (5k\pm2)^2\equiv4\pmod 5$
So, $\left(\frac p5\right)=1\iff p\equiv1,4\pmod 5$