Notations
Gauss used R and N to denote residuacity and non-residuacity, respectively;
- for example, 2 R 7 and 5 N 7, or 1 R 8 and 3,5,7 N 8.
Although this notation is compact and convenient for some purposes, the most useful notation is the Legendre symbol, also called the quadratic character, which is defined for all integers a and positive odd prime numbers p as
There are two reasons why numbers ≡ 0 (mod p) are treated specially. As we have seen, it makes many formulas and theorems easier to state. The other (related) reason is that the quadratic character is a homomorphism from the multiplicative group of nonzero conguence classes modulo p to the complex numbers. Setting allows its domain to be extended to the multiplicative semigroup of all the integers.
One advantage of this notation over Gauss's is that the Legendre symbol is a function that can be used in formulas. It can also easily be generalized to cubic, quartic and higher power residues.
There is a generalization of the Legendre symbol for composite values of p, the Jacobi symbol, but its properties are not as simple: if m is composite and the Jacobi symbol then a N m, and if a R m then but if we do not know whether a R m or a N m. If m is prime, the Jacobi and Legendre symbols agree.
Read more about this topic: Quadratic Residue