# values of the Legendre symbol

For an integer $a$ and an odd prime $p$, let $\displaystyle\left(\frac{a}{p}\right)$ be the Legendre symbol.

###### Theorem.

Let $p$ be an odd prime. The Legendre symbol takes the following values:

1. 1.
 $\left(\frac{-1}{p}\right)=\begin{cases}1&\text{if }p\equiv 1\mod 4\\ -1&\text{if }p\equiv 3\mod 4.\end{cases}$
2. 2.
 $\left(\frac{2}{p}\right)=\begin{cases}1&\text{if }p\equiv\pm 1\mod 8\\ -1&\text{if }p\equiv 3,5\mod 8.\end{cases}$
3. 3.
 $\left(\frac{3}{p}\right)=\begin{cases}1&\text{if }p\equiv\pm 1\mod 12\\ -1&\text{otherwise.}\end{cases}$
4. 4.
 $\left(\frac{5}{p}\right)=\begin{cases}1&\text{if }p\equiv\pm 1\mod 5\\ -1&\text{if }p\equiv 2,3\mod 5.\end{cases}$
###### Proof.

For a proof of (1), see http://planetmath.org/node/1IsQuadraticResidueIfAndOnlyIfPequiv1Mod4this entry. Part (2) is proved in http://planetmath.org/node/QuadraticCharacterOf2this entry. For parts (3), (4) and (5), we use quadratic reciprocity. For example,

 $\left(\frac{5}{p}\right)=\left(\frac{p}{5}\right)$

and the only quadratic residues modulo $5$ are $\pm 1\mod 5$. ∎

Title values of the Legendre symbol ValuesOfTheLegendreSymbol 2013-03-22 16:18:13 2013-03-22 16:18:13 alozano (2414) alozano (2414) 5 alozano (2414) Theorem msc 11-00 1IsQuadraticResidueIfAndOnlyIfPequiv1Mod4 QuadraticCharacterOf2