Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am studying the sums of Legendre symbol. It's easy to prove that for $p\equiv 1 \pmod 4$, $$\sum_{0<n<p/2}\left(\frac{n}{p}\right)=0.$$ by writing the sum over all residue classes and then using the fact that sum over $0$ to $p/2$ is same as $p/2$ to $p$ (by a change of variable). But the same idea is not working with the following two equalities:

(1) If $p\equiv 3 \pmod 8$, then $$\sum_{0<n<p/4} \left(\frac{n}{p}\right) =0.$$ (2) If $p\equiv 7 \pmod 8$, then $$\sum_{p/4<n<p/2} \left(\frac{n}{p}\right) =0.$$ Thanks in advance for any help.

share|cite|improve this question

(1) If $p \equiv 3 \pmod{8}$ then $(\frac{-1}{p})=(\frac{2}{p})=-1$. Let $p=8k+3$. Observe that

\begin{align} \sum_{1 \leq n \leq 2k}{(\frac{n}{p})}+\sum_{2k+1 \leq n \leq 4k+1}{(\frac{n}{p})}& =\sum_{1 \leq n \leq 4k+1}{(\frac{n}{p})} \\ & =\sum_{1 \leq n \leq 2k}{(\frac{2n}{p})}+\sum_{1 \leq n \leq 2k+1}{(\frac{2n-1}{p})} \\ & =(\frac{2}{p})\sum_{1 \leq n \leq 2k}{(\frac{n}{p})}+(\frac{-1}{p})\sum_{1 \leq n \leq 2k+1}{(\frac{p+1-2n}{p})} \\ & =(\frac{2}{p})\sum_{1 \leq n \leq 2k}{(\frac{n}{p})}+(\frac{-1}{p})\sum_{2k+1 \leq n \leq 4k+1}{(\frac{2n}{p})} \\ & =(\frac{2}{p})\sum_{1 \leq n \leq 2k}{(\frac{n}{p})}+(\frac{-1}{p})(\frac{2}{p})\sum_{2k+1 \leq n \leq 4k+1}{(\frac{n}{p})} \\ & =-\sum_{1 \leq n \leq 2k}{(\frac{n}{p})}+\sum_{2k+1 \leq n \leq 4k+1}{(\frac{n}{p})} \end{align}


\begin{equation} \sum_{0<n<\frac{p}{4}}{(\frac{n}{p})}=\sum_{1 \leq n \leq 2k}{(\frac{n}{p})}=0 \end{equation}

(2) If $p \equiv 7 \pmod{8}$ then $(\frac{-1}{p})=-1, (\frac{2}{p})=1$. Let $p=8k+7$. Observe that

\begin{align} \sum_{1 \leq n \leq 2k+1}{(\frac{n}{p})}+\sum_{2k+2 \leq n \leq 4k+3}{(\frac{n}{p})}& =\sum_{1 \leq n \leq 4k+3}{(\frac{n}{p})} \\ & =\sum_{1 \leq n \leq 2k+1}{(\frac{2n}{p})}+\sum_{1 \leq n \leq 2k+2}{(\frac{2n-1}{p})} \\ & =(\frac{2}{p})\sum_{1 \leq n \leq 2k+1}{(\frac{n}{p})}+(\frac{-1}{p})\sum_{1 \leq n \leq 2k+2}{(\frac{p+1-2n}{p})} \\ & =(\frac{2}{p})\sum_{1 \leq n \leq 2k+1}{(\frac{n}{p})}+(\frac{-1}{p})\sum_{2k+2 \leq n \leq 4k+3}{(\frac{2n}{p})} \\ & =(\frac{2}{p})\sum_{1 \leq n \leq 2k+1}{(\frac{n}{p})}+(\frac{-1}{p})(\frac{2}{p})\sum_{2k+2 \leq n \leq 4k+3}{(\frac{n}{p})} \\ & =\sum_{1 \leq n \leq 2k+1}{(\frac{n}{p})}-\sum_{2k+2 \leq n \leq 4k+3}{(\frac{n}{p})} \end{align}


\begin{equation} \sum_{\frac{p}{4}<n<\frac{p}{2}}{(\frac{n}{p})}=\sum_{2k+2 \leq n \leq 4k+3}{(\frac{n}{p})}=0 \end{equation}

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.