Modular Arithmetic/Lagrange's Theorem

Lagrange's Theorem

If is a prime number, , and is a polynomial with integer coefficients, then either:

Every coefficient of is divisible by ,


has at most solutions.

Where is the degree of . If the modulus is not prime, then it is possible for there to be more than solutions.