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. 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):458–462 of quadratic reciprocity and he proved it again in his fifth proof (1818).:496–501 For any odd prime p let a be an integer that is coprime to p.