Definition:Legendre Symbol/Definition 1

Definition
Let $p$ be an odd prime.

Let $a \in \Z$.

The Legendre symbol $\paren {\dfrac a p}$ is defined as:
 * $\paren {\dfrac a p} := \begin{cases} +1 & : a^{\frac {\paren {p - 1} } 2} \bmod p = 1 \\

0 & : a^{\frac {\paren {p - 1} } 2} \bmod p = 0 \\ -1 & : a^{\frac {\paren {p - 1} } 2} \bmod p = p - 1 \end{cases}$ where $x \bmod y$ denotes the modulo operation.

Also see

 * Equivalence of Definitions of Legendre Symbol