# Math Help - quadratic residue problem

If a prime number p is in the form p=4k+1, then how do I prove that the sum of the quadratic residues mod p is equal to p(p-1)/4? I tried adding consecutive perfect squares up to [((p-1)/2)^2]^2 and then subtracting to get the congruences, but that didn't work too well. Any suggestions are welcome

2. Note that, if $p\equiv{1}(\bmod.4)$ then $-1$ is a qudratic residue, hence $\left(\tfrac{k}{p}\right)_L=\left(\tfrac{p-k}{p}\right)_L$ ( Legendre's Symbol)

Thus we find that $2S=\sum_{0\leq k. - the sum is taken over the quadratic residues-

Now, how many quadratic residues are there?