WordGPT

Wilson's theorem for p = 7

Exercise Β· Level 4 (Hard)

Show that 7 divides 6! + 1, and explain why pairing inverses proves it for every prime.

(pβˆ’1)!β‰‘βˆ’1(modp)(p-1)!\equiv-1\pmod p

wordgptpro.com

Solution

  1. Compute: 6!=720=7β‹…103βˆ’16!=720=7\cdot103-1, so 6!+1=721=7β‹…1036!+1=721=7\cdot103. Indeed 7 divides it.

  2. Why: modulo 7 the numbers 2, 3, 4, 5 pair off into products equal to 1, namely 2β‹…4=8≑12\cdot4=8\equiv1 and 3β‹…5=15≑13\cdot5=15\equiv1. Only 1 and 6 are their own inverses (6β‰‘βˆ’16\equiv-1):

    6!=1β‹…(2β‹…4)(3β‹…5)β‹…6≑1β‹…1β‹…1β‹…(βˆ’1)=βˆ’1(mod7)\begin{aligned}&6!\\&=1\cdot(2\cdot4)(3\cdot5)\cdot6\equiv1\cdot1\cdot1\cdot(-1)\\&=-1\pmod 7\end{aligned}
    (1)
  3. For a general prime, the numbers 2,…,pβˆ’22,\dots,p-2 split into inverse pairs, leaving 1β‹…(pβˆ’1)β‰‘βˆ’11\cdot(p-1)\equiv-1.

Answer7∣6!+1=7217\mid 6!+1=721

wordgptpro.com

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

  1. Compute: 6!=720=7β‹…103βˆ’16!=720=7\cdot103-1, so 6!+1=721=7β‹…1036!+1=721=7\cdot103. Indeed 7 divides it.

  2. Why: modulo 7 the numbers 2, 3, 4, 5 pair off into products equal to 1, namely 2β‹…4=8≑12\cdot4=8\equiv1 and 3β‹…5=15≑13\cdot5=15\equiv1. Only 1 and 6 are their own inverses (6β‰‘βˆ’16\equiv-1):

    6!=1β‹…(2β‹…4)(3β‹…5)β‹…6≑1β‹…1β‹…1β‹…(βˆ’1)=βˆ’1(mod7)\begin{aligned}&6!\\&=1\cdot(2\cdot4)(3\cdot5)\cdot6\equiv1\cdot1\cdot1\cdot(-1)\\&=-1\pmod 7\end{aligned}
    (1)
  3. For a general prime, the numbers 2,…,pβˆ’22,\dots,p-2 split into inverse pairs, leaving 1β‹…(pβˆ’1)β‰‘βˆ’11\cdot(p-1)\equiv-1.

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.

Related problems

More number theory problems

    Wilson's theorem for p = 7: answer and solution | WordGPT