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

148 Views Asked by At

Prove that: $$(p - 1)! \equiv p - 1 \pmod{p(p - 1)}$$

In text it's not mentioned that $p$ is prime, but I checked and this doesn't hold for non-prime, so I guess $p$ is prime .. I know that $(p - 1)! \equiv -1 \equiv p - 1 \pmod p$, and $(p - 1)! \equiv 0 \equiv (p - 1) \pmod{p - 1}$, the problem is that I don't know how to combine these. Is it true that then we have: $(p - 1)! \equiv (p - 1)^2 = p^2 - p - p + 1 \equiv - p + 1 = - (p - 1) \pmod{p(p - 1)}$, which is not the desired result .. ? Or I need to multiply both sides of congruences ? What are the laws for congruences that allow me to do this ? (I hope you get the idea of what I'm trying to ask).

2

There are 2 best solutions below

3
On BEST ANSWER

Apply Chinese remainder theorem to the coprime moduli $p$ and $p-1$.

However, if you can't use CRT, you can simply observe $(p-1)!-(p-1)$ is divisible by $p-1$ (obvious factor) and by $p$ (Wilson's), so it is divisible by their least common multiple $\operatorname{lcm}(p,p-1)=p(p-1)$.

0
On

1) Theorem. If $a|c$, $b|c$ and $(a,b)=1$ then $ab|c$

We know that $ (p,p-1)=1$ and also $p-1|(p-1)!-(p-1)$

By wilson theorem $p|(p-1)!+1$. Then $p|[(p-1)!+1]-p$

Therefore $p(p-1)| (p-1)!-(p-1)$