# 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

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

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

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

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

so $\displaystyle a b-1$ is divisible by p

$\displaystyle a p b - p$ is divisible by $\displaystyle 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

$\displaystyle 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

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

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

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

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

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