•
|
The legendre(a, p) function computes the Legendre symbol of a and p, which is defined to be if a is a quadratic residue , if a is a quadratic non-residue , and if a is congruent to . The number a is a quadratic residue mod p if it is not a multiple of p and has a square root , that is, there is an integer such that is congruent to . The number a is a quadratic non-residue mod p if it is not a multiple of p and does not have a square root .
|