Here's a little number theory problem I'm wrestling with.

Let $p$ and $q$ be odd prime numbers with $p=q+4a$ for some $a \in \mathbb{Z}$. Prove that $$\left( \frac{a}{p} \right) = \left( \frac{a}{q} \right),$$

where $\left( \frac{a}{p} \right)$ is the Legendre symbol. I have been trying to use the law of quadratic reciprocity but to no avail. Can you help?

  • $\begingroup$ Dividing both sides of the equation by $a$ and then rearranging, we get $p = q$ which is only true of $a = 0$. $\endgroup$
    – Gerard
    Nov 13, 2013 at 2:04
  • 1
    $\begingroup$ $\left( \frac{a}{p}\right)$ is the Legendre symbol. $\endgroup$ Nov 13, 2013 at 2:10

1 Answer 1


Note that $p \equiv q \pmod{4}$, so $\frac{p-1}{2}\frac{q+1}{2} \equiv \frac{p-1}{2}\frac{p+1}{2} \equiv 0 \pmod{2}$.

\begin{align} \left(\frac{a}{p}\right)=\left(\frac{4a}{p}\right)=\left(\frac{p-q}{p}\right)& =\left(\frac{-q}{p}\right) \\ & =\left(\frac{-1}{p}\right)\left(\frac{q}{p}\right) \\ &=(-1)^{\frac{p-1}{2}}\left(\frac{p}{q}\right)(-1)^{\frac{p-1}{2}\frac{q-1}{2}} \\ &=(-1)^{\frac{p-1}{2}\frac{q+1}{2}}\left(\frac{p-q}{q}\right) \\ &=\left(\frac{4a}{q}\right) \\ &=\left(\frac{a}{q}\right) \end{align}


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .