For , , so Bézout gives and is an inverse modulo .
If and , then , hence ; these differ for odd . It fails for composite moduli: has four square roots modulo .
For prime , pair each nonzero residue with its inverse; only are self-inverse, yielding Wilson theorem. Conversely, if , every is a unit (otherwise a common divisor would divide the left side and but not ), so is prime.
Wilson gives . Since , , hence .
By Fermat, . Thus . The squaring map on has kernel , so exactly inputs are squares; the polynomial has at most that many roots and already has all squares, proving the two cases.

Articles by others on the same topic (0)

There are currently no matching articles.