Examples
Note that when \(m = 5\), \(0, 1\) and \(4\) are quadratic residues modulo \(5\) since
When \(m = 8\), \(0, 1\) and \(4\) are the only quadratic residues modulo \(8\).
If we continue to do more examples, we will notice that when \(p\) is prime, we will get special properties. Assuming that \(\gcd(p,a) = 1\) and \(p \nmid a\), then we will have the following theorem:
Note here that although \(a = 0\) is a quadratic residue modulo \(p\) by definition, this theorem fails for \(a = 0\). Hence, we must assume that \(\gcd(a,p) = 1\) or \(p \nmid a\).
Proof
\(\Rightarrow\): Let \(p\) be an odd prime such that \(p \nmid a\). Suppose \(a\) is a quadratic residue modulo \(p\). Let \(x\) be any integer such that
By assumption, we know that \(p \nmid a\). We claim that \(p \nmid x\). To see this, suppose for the sake of contradiction that \(p \mid x\). Then \(x \equiv 0 \pmod{p}\) which implies that
But we know that \(x^2 \equiv a \pmod{p}\). This would mean that
i.e. \(p \mid a\). This is a contradiction since we assumed that \(p \nmid a\). Hence, we must have that \(p \nmid x\) and so \(\gcd(p,x) = 1\). Thus, by Fermat’s Little Theorem
Now, raise \((1)\) to the power \((p-1)/2\) to see that
Finally, combine (2) and (3) to get
\(\Leftarrow\): Now suppose that
TODO …
\(\ \blacksquare\).
References
- Number Theory by Georege Andrews