<P> For example, from the table for modulus 15 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 (residues in bold). </P> <P> The product of the nonresidues 2 and 8 is the residue 1, whereas the product of the nonresidues 2 and 7 is the nonresidue 14 . </P> <P> This phenomenon can best be described using the vocabulary of abstract algebra . The congruence classes relatively prime to the modulus are a group under multiplication, called the group of units of the ring Z / nZ, and the squares are a subgroup of it . Different nonresidues may belong to different cosets, and there is no simple rule that predicts which one their product will be in . Modulo a prime, there is only the subgroup of squares and a single coset . </P> <P> The fact that, e.g., modulo 15 the product of the nonresidues 3 and 5, or of the nonresidue 5 and the residue 9, or the two residues 9 and 10 are all zero comes from working in the full ring Z / nZ, which has zero divisors for composite n . </P>

If p is an odd prime then number of quadratic residues modulo p