[Math] Find all primes $p$ such that $14$ is a quadratic residue modulo $p$.

elementary-number-theoryquadratic-residues

I want to find all primes $p$ for which $14$ is a quadratic residue modulo $p$. I referred to an example that was already posted for finding all odd primes $p$ for which $15$ is a quadratic residue modulo $p$, but I am getting stuck.

This is what I have done:
$$\left(\frac{14}{p}\right)=\left(\frac{7}{p}\right)\left(\frac{2}{p}\right)=(-1)^{(p-1)/2}\left(\frac{p}{7}\right)\left(\frac{p}{2}\right).
$$
There are now two cases. If $p\equiv 1\pmod{13}$, you have $(14|p)=(p|7)(p|2)$, want $(p|7)$ and $(p|2)$ to have the same sign. The squares modulo $2$ and $7$ are $p\equiv 1\pmod{2}$ and $p\equiv 1,2,4\pmod{7}$, and the nonsquares are $p\equiv 3,5,6 \pmod{7}$.

This is where I am stuck do I just check the possibilities $\pmod {182}$? I think I need to use the condition that $p \equiv 1\pmod{13}$. I am just very confused and would really appreciate some clarification.

Best Answer

Quadratic reciprocity modulo $2$ works slightly differently. In fact, it holds that

$$\left(\frac{2}{p}\right) = (-1)^{(p^2-1)/8}.$$

Thus, you have:

$$\left(\frac{14}{p}\right) = (-1)^{(p^2-1)/8} \cdot (-1)^{(p-1)/2} \cdot \left(\frac{p}{7}\right).$$

This means that you need to look at the form of $p$ modulo $8$ (first two terms) and modulo $7$ (last term). For $p \equiv 1, 3, 5, 7 \pmod{8}$, the product of the initial two terms is $+1, +1, -1, -1$ respectively. Thus, you need either of the two options to hold:

  • $p \equiv 1,3 \pmod{8}$ and $p$ is a quadratic residue modulo $7$, i.e. $p \equiv 1,2,4 \pmod{7}$,

  • $p \equiv 5,7 \pmod{8}$ and $p$ is a not quadratic residue modulo $7$ i.e. $p \equiv 3,5,6 \pmod{7}$.

In each situation, you have $6$ possible cases, each corresponding to a "good" residue of $p$ modulo $56$ (by Chinese remainder theorem). It is a little mundane to work these out, but each pair of congruences $p \equiv a \pmod{8}, p \equiv b \pmod{7}$ is equivalent to the single congruence $p \equiv c \pmod{56}$, where $c$ happens to be given by $c = 8 b - 7 a$.