\left(\frac{a}{p}\right) =  \begin{cases}  1 & \text{ if } a \text{ is a quadratic residue modulo } p \text{ and } a \not\equiv 0\pmod{p}, \\ -1 & \text{ if } a \text{ is a quadratic non-residue modulo } p, \\  0 & \text{ if } a \equiv 0 \pmod{p}.   \end{cases}