LECTURE NOTES IN ANALYSIS (2011)
《LECTURE NOTES IN ANALYSIS (2011)》 · 第 133 页 · Section 3.1「Quadratic Residues」,Theorem 3.2
Lemma of Gauss. For any odd prime $p$ let $(a,p)=1$. Consider the integers $a,2a,3a,\ldots,((p-1)/2)a$ and their least positive residues modulo $p$. If $n$ denotes the number of these residues that exceed $p/2$, then $\left(\frac ap\right)=(-1)^n$.