Legendre Symbol Calculator
Work out legendre symbol instantly with clear inputs, formula shown and shareable results.
About Legendre Symbol Calculator
The Legendre symbol (a|p) is 1 when a is a non-zero square modulo p, −1 when it is not, and 0 when p divides a. Euler's criterion computes it as a^((p−1)/2) mod p, reading p − 1 as −1.
Formula
Euler's criterion
(a|p) ≡ a^((p−1)/2) (mod p)
Worked example
With the default values below, Legendre Symbol Calculator returns Legendre symbol (a|p) of 1. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Numerator a
- 5
- Odd prime pminimum 3
- 11
Results
- Legendre symbol (a|p)
- 1
- Meaning
- 5 is a quadratic residue mod 11
- a^((p−1)/2) mod p
- 1
- Number of non-zero quadratic residues mod p
- 5
Step by step
- 1Values used
- 2Euler's criterion
- 3Legendre symbol (a|p)= 1
- 4Meaning= 5 is a quadratic residue mod 11
- 5a^((p−1)/2) mod p= 1
- 6Number of non-zero quadratic residues mod p= 5
Assumptions and limits
- The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Is 5 a square mod 11?
5⁵ mod 11 = 1, so yes: 4² = 16 ≡ 5 (mod 11).
How many residues are there?
Exactly (p − 1)/2 non-zero ones, since x and −x always square to the same value.
Related Calculators
You might also need
- Discrete Logarithm CalculatorAlso in Discrete Math, Logic & Number Theory
- Adjacency Matrix CalculatorAlso in Discrete Math, Logic & Number Theory
- Base 64 Value CalculatorAlso in Discrete Math, Logic & Number Theory
- Bell Number CalculatorAlso in Discrete Math, Logic & Number Theory
- Binary To Decimal CalculatorAlso in Discrete Math, Logic & Number Theory
- Binary To Hexadecimal CalculatorAlso in Discrete Math, Logic & Number Theory
