Definition 16.3.1.
Assume that \(a\not\equiv 0\) (mod \(p\)), for \(p\) a prime.
- If there is a solution of \(x^2\equiv a\) (mod \(p\)) we say that \(a\) is a quadratic residue of \(p\) (or a QR).
- If there is not a solution of \(x^2\equiv a\) (mod \(p\)) we say that \(a\) is a quadratic nonresidue of \(p\text{.}\)
Although some authors also define this notion for composite moduli (as does Sage, see Sage note 16.3.3), we will go with the majority and reserve these terms for prime moduli.