Legendre symbol evaluator

Properties of the Legendre symbol

p is an odd prime, a ≢ 0 (mod p) and b ≢ 0 (mod p), and qp is an odd prime.

Congruent numbers
If ab (mod p) then (a | p) = (b | p)
Square numbers
(a2 | p) = 1
Composite numbers
(ab | p) = (a | p) (b | p)
Quadratic character of -1
(-1 | p) = (-1)(p - 1) / 2
Quadratic character of 2
(2 | p) = (-1)(p2 - 1) / 8
Law of quadratic reciprocity (1)
If p ≢ 1 (mod 4) or q ≢ 1 (mod 4) then (p | q) = (q | p)
Law of quadratic reciprocity (2)
If pq ≢ 3 (mod 4) then (p | q) = -(q | p)

Evaluator

( | )

By Sean McGivern