IP331.com | Online Tools
HomeNumber Theory ToolsLegendre Symbol Calculator

Legendre Symbol Calculator

Evaluate (a/p) and test quadratic residue status modulo an odd prime

a
odd prime p

Legendre Symbol Formula

(a/p) = 1 if a is a quadratic residue mod p
(a/p) = -1 if a is a non-residue mod p
Euler criterion: (a/p) ≡ a^((p-1)/2) (mod p)

The Legendre symbol compresses quadratic residue information into one value. Euler criterion gives a practical calculation by raising a to half of p minus one modulo the odd prime p.

The modulus p must be an odd prime. For composite moduli, use Jacobi symbol methods instead of the Legendre symbol.

What Is the Legendre Symbol?

The Legendre symbol is a number theory notation that tells whether a number is a square modulo an odd prime. It is closely related to modular square roots and quadratic reciprocity.

Residue Result

Value 1 means x^2 = a mod p has a solution.

Non-Residue Result

Value -1 means no square root exists modulo p.

Zero Case

Value 0 means p divides a.

Euler Criterion

A fast exponent test evaluates the symbol.

Example: For a = 5 and p = 11, compute 5^5 mod 11. The result determines whether 5 is a quadratic residue modulo 11.

Applications of Legendre Symbols

Quadratic Residues Modular Square Roots Euler Criterion Reciprocity Cryptography

Frequently Asked Questions

What is a Legendre symbol calculator?
It evaluates (a/p), which tells whether a is a quadratic residue, non-residue, or divisible by the odd prime p.
What formula does the Legendre symbol use?
Euler criterion says (a/p) is congruent to a^((p-1)/2) modulo p, with results 1, -1, or 0.
How do I use this Legendre symbol tool?
Enter integer a and an odd prime p. The calculator reduces a modulo p and applies Euler criterion.
What does Legendre symbol -1 mean?
A result of -1 means a is a quadratic non-residue modulo p, so x^2 ≡ a mod p has no solution.
Where is the Legendre symbol used?
It is used in quadratic residues, modular square roots, reciprocity laws, cryptography, and advanced number theory.

More Number Theory Tools

Free online calculators and tools covering mathematics, unit conversion, text processing, and daily life. Accurate, fast, mobile-friendly, and completely free to use.

© 2026 IP331.com — Free Online Tools. All rights reserved.

About · Contact · Privacy Policy · Cookie Policy · Terms of Use · Disclaimer · Sitemap