Let $Q = \{a:{1\le a\le p-1 \text{ and } a \text{ is a quadratic residue}}\}$. Prove that if $p\ge 5$, then $\sum_{t\in Q} t \equiv 0 \pmod{p}$.

76 Views Asked by At

If $Q = \{a: \mbox{$1\le a\le p-1$ and $a$ is a quadratic residue}\}$. How can i prove that if $p\ge 5$, then $\sum_{t\in Q} t \equiv 0 \pmod{p}$. Any help is appreciated

2

There are 2 best solutions below

0
On

Let $g$ be a primitive root of $p$. Then the quadratic residues of $p$ are congruent, in some order, to $1, g^2,g^4,g^6,\dots, g^{p-3}$ (the even powers of $g$).

Note that $$(1+g^2+g^4+\cdots+g^{p-3})(1-g^2)=1-g^{p-1}\equiv 0\pmod{p}.$$ If $p\gt 3$, then $1-g^2\not\equiv 0\pmod{p}$, since $g$ has order $p-1$, and the result follows.

Remark: The result can also be proved without using primitive roots, but the argument is somewhat more complicated.

1
On

In fact I don't think it is that much more complicated, as it is congruent to $\sum\limits_{i=1}^\frac{p-1}{2} i^2$ and if you use the usual formula you see that for $p>3$, $p$ divides the expression and so divides the sum required.