Artificial intelligent assistant

Solving Congruency Using Quadratic Reciprocity Use quadratic reciprocity to show that if p is an odd prime different from 5, then 5 is a quadratic residue (mod p) if and only if p $\equiv\pm$ 1 (mod 5).

Applying the Quadratic Reciprocity law in your example we know that for $5$ to be a quadratic residue $\mod p$ and $p\
e 5$ the following conditions must satisfy:

The legendre symbol $(\frac{p}{5})$ and $(\frac{5}{p})$ are both equal, which means that 5 is a quadratic residue modulo every odd prime which is a residue modulo 5.

Example, let $p=31$ and $q=5$

$(\frac{p}{q}) = p^{\frac{q-1}{2}} \pmod q$ then $1\equiv 31^{2} \pmod 5$

$(\frac{q}{p}) = q^{\frac{p-1}{2}} \pmod p$ then $1\equiv 5^{15} \pmod{31}$

Also notice that $(\frac{p}{q})$ and $(\frac{r}{q})$ will be equal with $r$ being $p = kq+r$ such that $r= 0 \leq r < p$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy df839bdd11031646b28c28bde6dde12d