Modular Arithmetic/Wilson's Theorem

Modular Arithmetic
 ← Lagrange's Theorem Wilson's Theorem Chinese Remainder Theorem → 
Wilson's theorem

A natural number is a prime number if and only if:

denotes the factorial of . For all natural numbers, it gives the product of all numbers less than or equal to .


5 is a prime number because,




which is true. 6, on the other hand, is not, as




which is false.