1. ## ...sum of all quadratic residues modulo p...

Let p be a prime > 3. Show that the sum of all the quadratic residues modulo p is divisible by p.

2. Originally Posted by NikoBellic
Let p be a prime > 3. Show that the sum of all the quadratic residues modulo p is divisible by p.
Let $g$ be a primitive root modulo $p$.

$A_p=\{1,g^2,g^4,\cdot\cdot\cdot, g^{p-3}\}$ is the collection of all quadratic residues.
This is because $|A_p| = \frac{p-1}{2}$ and every element in $A_p$ is a square due to the even exponent. Since there are only $\frac{p-1}{2}$ quadratic residues, $A_p$ must be the list of quadratic residues modulo $p$.

$1+g^2+g^4+\cdot\cdot\cdot+g^{p-3} = \frac{1-g^{p-1}}{1-g^2} \equiv 0 \mod{p}$.

$p>3$, otherwise $(1-g^2)^{-1}$ doesn't exist.