Number Theory/ Legendre Symbol Calculation

 Legendre Symbol Calculator

This online calculator is used to figure out the legendre symbol of given two numbers(a and p).

Step by Step calculation
  

Legendre symbol Calculation Definition, Formulae

Definition

Let p be an odd prime number.

An integer a is a quadratic residue modulo p if it is congruent to a perfect square modulo p and is a quadratic nonresidue modulo p otherwise.

The Legendre symbol is a function of a and p defined as

The notational convenience of the Legendre symbol inspired introduction of several other symbols used in algebraic number theory, such as the Hilbert symbol and the Artin symbol.

Rules To Find Legendre Symbol

(a/n) = (b/n) if a = b mod n.

(1/n) = 1 and (0/n) = 0.

(2m/n) = (m/n) if n = ±1 mod 8. Otherwise (2m/n) = -(m/n).

(Quadratic reciprocity) If m and n are both odd, then (m/n) = (n/m) unless both m and n are congruent to 3 mod 4, in which case (m/n) = -(n/m).

Legendre symbol Table

The following is a table of values of Legendre symbol (a / p) with p ≤ 127, a ≤ 30, p odd prime

a
p
123456789101112131415161718192021222324252627282930
3-1-10-1-101-1-01-101-10-1-101-101-10-1-101-10
51-1-1101-1-1101-1-1101-1-1101-1-1101-1-110
711-11-1-1011-11-1-1011-11-1-1011-11-1-1011
111-1111-1-1-11-101-1111-1-1-11-101-1111-1-1-1
131-111-1-1-1-111-1101-111-1-1-1-111-1101-111
1711-11-1-1-111-1-1-11-111011-11-1-1-111-1-1-11
191-1-11111-11-11-1-1-1-111-101-1-11111-11-11
231111-11-111-1-111-1-11-11-1-1-1-101111-11-1
291-1-11111-11-1-1-11-1-11-1-1-11-11111-1-1101
3111-111-11111-1-1-11-11-1111-1-1-1-11-1-11-1-1
371-111-1-11-11111-1-1-11-1-1-1-11-1-1-11111-11
4111-111-1-1111-1-1-1-1-11-11-111-11-11-1-1-1-1-1
431-1-11-11-1-1111-111111-1-1-11-1111-1-1-1-1-1
471111-11111-1-11-11-1111-1-11-1-111-111-1-1
531-1-11-111-1111-11-1111-1-1-1-1-1-111-1-111-1
591-1111-11-11-1-11-1-1111-11111-1-111111-1
611-1111-1-1-11-1-111111-1-111-11-1-11-11-1-1-1
671-1-11-11-1-111-1-1-11111-11-1111111-1-11-1
71111111-1111-11-1-111-1111-1-1-111-11-111
731111-11-111-1-11-1-1-11-111-1-1-1111-11-1-1-1
7911-111-1-11111-11-1-11-1111111-111-1-1-1-1
831-111-1-11-11111-1-1-111-1-1-11-11-1111111
8911-111-1-11111-1-1-1-1111-1111-1-11-1-1-1-1-1
971111-11-111-111-1-1-11-11-1-1-11-111-11-1-1-1
1011-1-1111-1-11-1-1-111-111-11111111-1-1-1-11
10311-11-1-1111-1-1-11111111-1-1-11-111-1111
1071-111-1-1-1-1111111-11-1-11-1-1-11-11-11-111
1091-1111-11-11-1-11-1-111-1-1-1111-1-111111-1
11311-11-1-1111-11-11111-11-1-1-11-1-111-11-11
12711-11-1-1-111-11-11-111111-111-1-111-1-1-11