number theory calculators

Quadratic Residues Calculator

Determine quadratic residues and non-residues modulo a prime using Legendre symbols

About this calculator

The Quadratic Residues Calculator determines whether integers are quadratic residues or non-residues modulo a prime number using Legendre symbols. A quadratic residue modulo p is an integer that has a square root modulo p. This tool is essential for number theory studies, cryptography applications, and advanced mathematics coursework. It helps students and researchers quickly identify patterns in quadratic residuity, solve congruence equations, and understand the distribution of squares modulo primes without manual calculations.

How to use

Enter the integer you want to test and the prime modulus in the designated fields. Click calculate to determine if your number is a quadratic residue. The calculator will display the Legendre symbol result: +1 for quadratic residues, -1 for non-residues, and 0 if 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 x² ≡ a (mod p) has a solution. Essentially, it's a number that can be expressed as a perfect square modulo p.

What does the Legendre symbol tell us?

The Legendre symbol (a/p) equals +1 if a is a quadratic residue mod p, -1 if it's a non-residue, and 0 if p divides a.

Why must the modulus be prime?

Legendre symbols are specifically defined for prime moduli. For composite numbers, we use Jacobi symbols instead, which generalize the concept but have different properties.