Definition (Quadratic Residue)
An integer is a quadratic residue modulo if there exists an integer such that
If no such exists, then is a quadratic nonresidue modulo .
Legendre Symbol
If is an odd prime, the Legendre symbol is defined by
Theorem (Euler’s Criterion)
If is an odd prime and , then
Since the Legendre symbol is always in this case, this means
This is useful for deciding whether a number is a square modulo a prime.