Wilson's Theorem
An integer is prime if and only if is divisible by . It is an elegant (though slow) characterisation of primes. It is used in number theory proofs and as a theoretical test of primality.
LaTeX
(p-1)!\equiv-1\pmod pVariables
- prime number
Example
Check for .
- , and .
Answer: .