Definition:Legendre Symbol/Definition 1

Definition
Let $p$ be an odd prime.

Let $a \in \Z$.

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

0 & : a^{\frac{(p - 1)} 2} \bmod p = 0 \\ -1 & : a^{\frac{(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