Put . Because , the supplementary laws give
Let and be the quadratic residues and nonresidues, respectively, among , and put
Since is a nonresidue, the complete set of least positive quadratic residues is
If , its sum is
Since is a residue, multiplication by two permutes modulo . Exactly the upper-half residues cross when doubled. Equality of the sums before and after reduction therefore gives
Comparing the two formulas yields
As ,
This is the lower-half quadratic-residue sum for primes congruent to seven modulo eight.