*** Welcome to piglix ***

Gauss's lemma (number theory)


Gauss's lemma in number theory gives a condition for an integer to be a quadratic residue. Although it is not useful computationally, it has theoretical significance, being involved in some proofs of quadratic reciprocity.

It made its first appearance in Carl Friedrich Gauss's third proof (1808) of quadratic reciprocity and he proved it again in his fifth proof (1818).

For any odd prime p let a be an integer that is coprime to p.

Consider the integers

and their least positive residues modulo p. (These residues are all distinct, so there are (p − 1)/2 of them.)

Let n be the number of these residues that are greater than p/2. Then

where is the Legendre symbol.

Taking p = 11 and a = 7, the relevant sequence of integers is

After reduction modulo 11, this sequence becomes

Three of these integers are larger than 11/2 (namely 6, 7 and 10), so n = 3. Correspondingly Gauss's lemma predicts that

This is indeed correct, because 7 is not a quadratic residue modulo 11.

The above sequence of residues

may also be written

In this form, the integers larger than 11/2 appear as negative numbers. It is also apparent that the absolute values of the residues are a permutation of the residues


...
Wikipedia

...