[Math] For an odd prime $p$, prove that the quadratic residues of $p$ are congruent modulo $p$ to the integers

elementary-number-theory

For an odd prime $p$, prove that the quadratic residues of $p$ are congruent modulo $p$ to the integers
$$1^2,2^2, 3^2,\ldots, \left(\dfrac{p-1}{2}\right)^2$$

I know Euler's criterion but not sure how to start the proof. Any help is appreciated. Thanks!

Best Answer

Quadratic residues modulo $p$ consists of the numbers $1^2,2^2,\ldots ,(p-1)^2$ by definition. But these $p-1$ squares are pairwise congruent because of $x^2\equiv (x-p)^2 \bmod p$. So it suffices to take $1^2,2^2,\ldots ,\left(\frac{p-1}{2}\right)^2$.