Britannica
Sources used in this answer
How does Wilson's theorem provide a test for prime numbers?
Created from Britannica articles
using AI.
AI can make mistakes, so verify using Britannica articles.
In number theory, Wilson’s theorem provides a definitive test for prime numbers based on the property that an integer is prime if and only if it divides the quantity .12
The theorem establishes this relationship in two ways:
* Primality: If is a prime number, then is divisible by .1
* Converse: If is a composite number, then is not divisible by .1
While this provides a mathematically absolute method to determine whether a number is prime, it is generally considered impractical for large numbers because calculating the factorial becomes computationally exhaustive as the value of increases.1