Proof that $5$ is a quadratic residue $(\mod p)$ with $p$ odd prime iif $p \equiv \pm 1 \mod 10$

elementary-number-theorylegendre-symbolmodular arithmetic

Here I present the following proof in order to receive corrections or any kind of suggestion to improve my handling/knowledge of modular arithmetic:

Prove that $5$ is a quadratic residue $(\mod p)$ with $p$ odd prime
iif $p \equiv \pm 1 \mod 10$ ; prove also that $5$ is NOT a quadratic residue $(\mod p)$
iif $p \equiv \pm 3 \mod 10$.

Dim:

To check if $5$ is a quadratic residue $(\mod p)$ I write the equivalent Legendre symbol with the condition:

$(5/p) = 1$

So I have for quadratic reciprocity $(5/p) = (p/5)(-1)^{{(p-1)(5-1)}\over 4}=(p/5)(-1)^{(p-1)}$

$\bullet$ The exponent $(p-1)$ must be $(\mod2)$

$\bullet$ $(p/5)$ means to find $p$ : $p(\mod5)$ $\rightarrow$ the choices are $1,3(\mod5)$ because $p$ is prime

The moduli are coprime $(2,5)=1$ so I can study for the two final cases $(\mod5\times 2)=(\mod10)$

Case $1(\mod10)$:

Here $(1/5)=1$ and for the exponent $p=1(\mod2)$ so the exponent $(p-1)$ must be even. So $(5/p)=1$ for $p=1(\mod10)$ but also for $p=-1(\mod10)$

Case $3(\mod10)$:

Here $(3/5)=-1$ because it's not a quadratic residue, and for the exponent $p=3(\mod2)=1(\mod2)$ so the exponent $(p-1)$ must be even. So $(5/p)=(-1)(1)=-1$ for $p=3(\mod10)$ but also for $p=-3(\mod10)$

$\Box$

I appreciate any kind of critics and corrections.

Thank you

Best Answer

See my other post use Gauss lemma to find $(\frac{n}{p})$:

$(\frac{5}{p}) = 1 \iff p \equiv \pm 1 \mod 5$