0

Okay so the full problem as stated is:

Let $p$ be a prime number. Show that $$(p-1)! \equiv -1 \mod p.$$

I attempted to use induction, where we let p=2 be our base case then consider all primes $\geq 3$ (which we know to be odd integers. But I am really not sure how to actually show this result. It is apparent that me and Number Theory are not getting along very well... Should I try to find the inverse of $(p-1)!$ or is that superfluous? If anyone could give me a hand, I'd be very thankful.

user30625
  • 727
  • As a rule of thumb, whenever you have an "all-the-things" expression, symmetry is likely exploitable somehow. Induction is when each thing follows from the previous thing(s), but there is nothing connecting the primes in this way for induction to work. – anon Jul 16 '14 at 18:38
  • 3
    Don't worry, it's a little bit cruel to ask someone who's being introduced to number theory to prove such statement. It's called Wilson's Theorem and Wilson himself only conjectured it; the proof came out one year later by Lagrange. – Deathkamp Drone Jul 16 '14 at 18:39
  • 2
    Look up some proofs on the Wikipedia and make sure you understand the main point of them: To consider the singular fact about prime numbers that inverses are unique and come in pairs modulo $p$ prime. – Deathkamp Drone Jul 16 '14 at 18:40
  • Yeah I ended up looking it up a few different ones. They were all rather confusing, but I found one that made the majority of sense to me. – user30625 Jul 18 '14 at 20:00

5 Answers5

3

The set $\{ 1,2, \dots , p-1\}$ is a restricted set of residues $\mod p$. If $a$ is any element of this set,then: $\{ a,2a, \dots, (p-1)a \} \ $ is also a restricted set of residues $ \ \mod p$. So,exactly one element of the second set is equivalent $\mod p$ to $1$. So,we have shown that for each $a \in \{ 1, \dots, p-1\}$ there is exactly one $b \in \{ 1, \dots, p-1 \}$ such that:

$$ab \equiv 1 \pmod p$$

Now we check if it can be $a=b$. This is equivalent to:

$$a^2 \equiv 1 \pmod p \Leftrightarrow p \mid a^2-1 \Leftrightarrow p \mid a-1 \text{ or } p \mid a+1 \Leftrightarrow a=1 \text{ or } a=p-1$$

We conclude that for each $a \in \{ 2, \dots, p-2 \}$ there is exactly one $b \in \{ 2, \dots, p-2\}$ so that:

$$ab \equiv 1 \pmod p, \ a\neq b$$

So,the numbers $2, \dots,p-2$ can be seperated into $\frac{p-3}{2}$ pairs,so that the product of the two numbers of each pair is equivalent $\pmod p$ to $1$,and therefore:

$$2 \cdots (p-2) \equiv 1 \pmod p$$

Therefore:

$$(p-1)! = 1 \cdot 2 \cdots (p-2) \cdot (p-1) \equiv 1 \cdot 1 \cdot (p-1) \equiv -1 \pmod p$$

evinda
  • 8,037
2

Hint: if $p$ is an odd prime, $\pm1$ are the only self inverses, and all other numbers come in pairs $a, a^{-1}$.

Mathmo123
  • 23,718
2

Hint:

Compare the polynomials $x^{p-1}-1$ and $(x-1)(x-2)\cdots (x-(p-1))$ modulo $p$.

Hayden
  • 17,075
2

This is a combinatoric/group theory proof:

First we prove that the number of cyclic subgroup of order $p$ in $Sym_{p}$ is $(p-2)!$.

There are $p!$ permutation of $p$ letter, which means there are $p!$ way of writing a cycle of $p$ element in cycle notation. Each element with order $p$ in $Sym_{p}$ is a cycle of $p$ letter (since $p$ is prime), and each of them corresponde to $p$ different way of writing in cycle notation. Hence there are $(p-1)!$ elements of order $p$. Cyclic subgroup of order $p$ are mutually disjoint except for the identity, and each of them contains $p-1$ element of order $p$. Hence there are $(p-2)!$ such subgroup.

Now, by Sylow's theorem, since each of those cyclic subgroup is a maximal $p$-subgroup in $Sym_{p}$, the number of them is in fact $kp+1$ for some $k$. Hence $(p-2)!\equiv 1(\mod p)$ which means $(p-1)!\equiv -1(\mod p)$.

Gina
  • 5,408
0

For a Positive Integer $a<p$ can you find another integer $b<p$ such that $ab=1\mod p$

Remember that :

As $a,p$ are relatively prime you would get some $q,r$ such that $aq+pr=1$

Do you think this can be done for all $a<p$?