Wilson's Theorem gives a powerful connection between factorials and prime numbers. This cheat sheet helps students recognize when a number is prime using modular arithmetic and understand why factorial congruences matter in number theory. It is especially useful for contest math, proofs, and advanced algebra topics.
The reference focuses on formulas, conditions, and careful reasoning rather than long computations.
The central result is that an integer is prime exactly when . Students also need modular inverses, congruence notation, and efficient ways to detect composites before applying a factorial test. Wilson's Theorem is elegant but not always computationally efficient for large numbers.
The most important skill is knowing when the theorem proves primality and when simpler divisibility tests should be used first.
Key Facts
- Wilson's Theorem states that an integer is prime if and only if .
- The congruence is equivalent to .
- If and , then is composite.
- To test whether is prime by trial division, check divisibility only by primes with .
- For a prime , every nonzero residue modulo has a modular inverse such that .
- In the proof of Wilson's Theorem, most residues modulo a prime pair with their inverses, leaving only and because has solutions .
- For a prime , Wilson's Theorem can be rearranged as because .
- Wilson's Theorem is a true primality criterion, but computing is usually inefficient for large .
Vocabulary
- Prime number
- A prime number is an integer greater than whose only positive divisors are and itself.
- Composite number
- A composite number is an integer greater than that has at least one positive divisor other than and itself.
- Congruence
- The statement means that divides .
- Factorial
- The factorial is the product for positive integers .
- Modular inverse
- A modular inverse of modulo is a number such that .
- Primality test
- A primality test is a method used to decide whether a given integer is prime or composite.
Common Mistakes to Avoid
- Using Wilson's Theorem on is wrong because the theorem requires an integer and primality is only defined for integers greater than .
- Forgetting the negative residue is wrong because means the same as , not .
- Assuming Wilson's Theorem is fast for large numbers is wrong because calculating can require many multiplications.
- Checking divisibility past is unnecessary because if and both and , then .
- Claiming that only suggests primality is wrong because Wilson's Theorem gives an if and only if condition for .
Practice Questions
- 1 Use Wilson's Theorem to verify that is prime by computing .
- 2 Determine whether passes Wilson's Theorem by computing .
- 3 For the prime , find the value of without multiplying all factors.
- 4 Explain why Wilson's Theorem is useful for proving facts about primes but is usually not the best practical method for testing very large numbers.