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