*** Welcome to piglix ***

Jacobi symbol


Jacobi symbol (m/n) for various m (along top) and n (along left side). Only 0 ≤ m < n are shown, since due to rule (2) below any other m can be reduced modulo n. Quadratic residues are highlighted in yellow — note that no entry with a Jacobi symbol of −1 is a quadratic residue, and if m is a quadratic residue modulo a coprime n, then (m/n) = 1, but not all entries with a Jacobi symbol of 1 (see the n = 9 row) are quadratic residues. Notice also that when either n or m is a square, all values are nonnegative.

The Jacobi symbol is a generalization of the Legendre symbol. Introduced by Jacobi in 1837, it is of theoretical interest in modular arithmetic and other branches of number theory, but its main use is in computational number theory, especially primality testing and integer factorization; these in turn are important in cryptography.

For any integer a and any positive odd integer n, the Jacobi symbol (a/n) is defined as the product of the Legendre symbols corresponding to the prime factors of n:


...
Wikipedia

...