# I What is a good way to introduce Wilson's Theorem?

1. Apr 24, 2017

### matqkks

What is the most motivating way to introduce Wilson’s Theorem? Why is Wilson’s theorem useful? With Fermat’s little Theorem we can say that working with residue 1 modulo prime p makes life easier but apart from working with a particular (p-1) factorial of a prime what other reasons are there for Wilson’s theorem to be useful?

Are there any good resources on this topic?

2. Apr 24, 2017

### Staff: Mentor

I doubt that there is a practical use. However, it is a quite funny result, especially if formulated as
$$(n-1)! \equiv \begin{cases} -1 \;(\operatorname{mod} n)& \textrm{ if } n \textrm{ prime }\\ 2 \;(\operatorname{mod} n)& \textrm{ if } n =4\\ 0 \;(\operatorname{mod} n)& \textrm{ other cases }\end{cases}$$
or elegant as $(p-1)! \equiv -1\; (\operatorname{mod} p) \Leftrightarrow p \textrm{ prime }$.

I also find the historical part interesting as Wilson only re-discovered it 700 years later:
https://en.wikipedia.org/wiki/Ibn_al-Haytham#Number_theory