Let $p$ be an odd prime number. Find the remainder when $(p − 1)!$ is divided by $2p$.

213 Views Asked by At

I know that by Wilson's theorem $(p-1)! \equiv-1\pmod{p}$, but I can't think of a way transform this into division by $2p$.

2

There are 2 best solutions below

1
On

$$p=2n+1$$

$$(p-1)! = (2n)!$$

$$(2n)!\equiv x\pmod{(2n+1)\cdot 2}$$

$$(p -1)!\equiv x\pmod{2p}$$

Hint:

$$x=p-1$$

4
On

Hint

$$(p-1)! \equiv -1 \equiv p-1 \pmod{p}\\ (p-1)! \equiv p-1 \pmod{2}\\$$