Show that if p ≡ 1 (mod 4) then
$$ \sum_{a=1}^{(p-1)/2} (\frac{a}{p}) = 0 $$
where $(\frac{a}{p})$ is the Legendre symbol.
Hint: You may find the result of question 7 of Exercises 7.1 helpful.
From Exercise (7.1).7 we have that if $a$ is a quadratic residue of $p$ then so is $p-a$ if and only if $p \equiv 1 \pmod 4$. This means the number of quadratic residues in the range $[1, \frac{p-1}{2}]$ is the same as the number in the range $[\frac{p+1}{2},p-1]$. Similarly for quadratic non-residues.
Proposition (7.4) tells us that there are $\frac{p-1}{2}$ quadratic residues, and $\frac{p-1}{2}$ quadratic non-residues, modulo odd prime $p$.
This means there are $\frac{p-1}{4}$ quadratic residues, and $\frac{p-1}{4}$ quadratic non-residues, in the range $[1, \frac{p-1}{2}]$.
The Legendre symbol for a quadratic residue is 1, and for a non-residue is -1. Since there are an equal number of quadratic residues and non-residues in the range $[1, \frac{p-1}{2}]$, the sum of the Legendre symbols is zero. And so,
$$ \sum_{a=1}^{(p-1)/2} (\frac{a}{p}) = 0 $$