# Thread: Modulus proof with factorials

1. ## Modulus proof with factorials

Hi everyone
I'm having trouble with the following question:
Prove that (2p−1)! ≡ p(mod p^2).
Hint: p divides (2p-1)!.
Any help would be much appreciated.
Thanks, Alex

2. ## Re: Modulus proof with factorials

Originally Posted by alexlbrown59
Hi everyone
I'm having trouble with the following question:
Prove that (2p−1)! ≡ p(mod p^2).
Hint: p divides (2p-1)!.
Any help would be much appreciated.
Thanks, Alex
let $p=4$

$(2p-1)! = 7! = 5040$

$p^2 = 16$

$5040 \pmod{16} = 0 \neq 4$

this sequence in $p$ is a bit interesting, it's $s_p = \begin{cases}p,&p \text{ is prime.} \\ 0, &\text{else} \end{cases}$

3. ## Re: Modulus proof with factorials

Sorry I should have put in the original question that p is a prime number! I have to show that it's true for all primes and this is the part I'm struggling with.
Thanks, Alex.

4. ## Re: Modulus proof with factorials

Let

$a=\prod _{k=1}^{p-1} (p+k)$

$b= \prod _{k=1}^{p-1} k$

$a p b=(2p-1)!$

By Wilson's Theorem, $a=-1$ and $b=-1$ mod p

so $a b-1$ is divisible by p

$a p b - p$ is divisible by $p^2$

5. ## Re: Modulus proof with factorials

Many thanks for replying but I don't understand the notation you've used...please could you write it out in plain English?
Thank you.

6. ## Re: Modulus proof with factorials

$a= \prod _{k=1}^{p-1} (p+k)=(p+1)(p+2)\text{...}(p+(p-1))=1*2*\text{...}*(p-1)=(p-1)!$ (mod p)

and

$b=\prod _{k=1}^{p-1} k=1*2*\text{...}*(p-1)=(p-1)!$ (mod p)

Now, look at $(2p-1)!$.
Break it up into the product of three pieces, a, p, and b so that $(2p-1)!=a p b$

$a=-1$ and $b=-1$ by Wilson's Theorem
so $a b=1$ mod p which means $a b=1+r p$ for some $r$

$(2p-1)!=a p b=p(1+rp)=p+r p^2$

Therefore $(2p-1)!-p$ is divisible by $p^2$