Quadratic Residue Checker
Enter a value a and a prime modulus p to check quadratic residuosity.
Result
How to use
- Enter your values in the fields above.
- Press Calculate to see your result instantly.
- Use the Share button to copy a link to your result.
About this calculator
An integer a is a quadratic residue modulo a prime p if there exists some x such that x² ≡ a (mod p) — in other words, a is a perfect square in modular arithmetic even if it isn't one in ordinary integers. Euler's criterion gives a fast way to test this without searching for x directly: a is a QR mod p if and only if a^((p−1)/2) ≡ 1 (mod p), and a non-residue if it's ≡ −1.
The result is usually expressed as the Legendre symbol (a/p), which is +1, −1, or 0. This calculator computes it, a routine step in number theory coursework and cryptographic algorithms — quadratic residues show up directly in primality tests, in the Tonelli-Shanks algorithm for computing modular square roots, and in some digital signature and zero-knowledge proof constructions.
Was this helpful?
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)