number theory calculators

Quadratic Residue Calculator

Determine quadratic residues and non-residues modulo prime numbers

About this calculator

A Quadratic Residue Calculator determines whether a given integer is a quadratic residue modulo a prime number. An integer 'a' is a quadratic residue modulo prime 'p' if there exists an integer 'x' such that x² ≡ a (mod p). This tool is essential for number theory studies, cryptography applications, and solving modular arithmetic problems. It helps mathematicians and students quickly identify quadratic residues and non-residues, which are fundamental concepts in algebraic number theory and have practical applications in encryption algorithms and mathematical proofs.

How to use

Enter the integer you want to test and the prime modulus in the respective input fields. Click calculate to determine if your number is a quadratic residue or non-residue. The calculator will show the result and may display the Legendre symbol value, where +1 indicates a quadratic residue, -1 indicates a non-residue, and 0 means the number is divisible by the prime.

Frequently asked questions

What is a quadratic residue?

A quadratic residue modulo prime p is an integer a where there exists some integer x such that x² ≡ a (mod p).

What is the Legendre symbol?

The Legendre symbol (a/p) equals +1 if a is a quadratic residue mod p, -1 if non-residue, and 0 if divisible by p.

Why are quadratic residues important?

They're fundamental in number theory, cryptography, and solving Diophantine equations. They help in primality testing and cryptographic protocols like RSA.