= Solution
<Gauss's lemma> states that, for $p\nmid a$, if $N$ of the least positive residues of $a,2a,\ldots,((p-1)/2)a$ exceed $p/2$, then $(a/p)=(-1)^N$.
For $a=2$, the residues are simply $2,4,\ldots,p-1$, with no reduction needed. Write $m=(p-1)/2$. A term $2j$ exceeds $p/2$ exactly when $j>p/4$, so
$$
N=\frac{p-1}2-\left\lfloor\frac p4\right\rfloor.
$$
If $p$ is congruent to $1,3,5,7$ modulo eight, the parity of this count is respectively even, odd, odd, even. <Gauss's lemma> therefore gives
$$
\boxed{\left(\frac2p\right)=\begin{cases}1,&p\equiv1,7\pmod8,\\-1,&p\equiv3,5\pmod8.\end{cases}}
$$
This proves the <second supplementary law for quadratic reciprocity>, rather than merely applying it.
Back to article page