Wilson's theorem for p = 7
Need a hint?
Modulo a prime, every number from 2 to p β 2 has a different inverse in the same range, so these numbers cancel in pairs.
6! + 1 = 721 = 7 Γ 103. Wilson's theorem says (p β 1)! β‘ β1 (mod p) for every prime p.
How to work it out
Compute: , so . Indeed 7 divides it.
Why: modulo 7 the numbers 2, 3, 4, 5 pair off into products equal to 1, namely and . Only 1 and 6 are their own inverses ():
(1)For a general prime, the numbers split into inverse pairs, leaving .
LaTeX source of the formulas on this page
\[ 7\mid 6!+1=721 \] \[ 6!=1\cdot(2\cdot4)(3\cdot5)\cdot6\equiv1\cdot1\cdot1\cdot(-1)=-1\pmod 7 \]
Questions
What is the answer to: Wilson's theorem for p = 7?
6! + 1 = 721 = 7 Γ 103. Wilson's theorem says (p β 1)! β‘ β1 (mod p) for every prime p.
What is the key idea?
In the integers modulo a prime, every nonzero number has a unique inverse, so the product pairs off.
Is there a hint?
Modulo a prime, every number from 2 to p β 2 has a different inverse in the same range, so these numbers cancel in pairs.