Explanation why $\frac{(x-1)!-(x-1)}x$ is always an integer for prime $x$

88 Views Asked by At

If $x$ is prime, $\frac{(x-1)!-(x-1)}x$ is always an integer.

Is there a way to explain this using modern algebra? I feel as if though it has to do with the concept of relatively prime or $\gcd$s, but I'm not exactly sure what is happening. I can verify it is true by plugging in a bunch of different primes and verifying that it works. I want to however explain this using algebra. I was thinking maybe divisor algorithm would work too. Thanks.

1

There are 1 best solutions below

5
On

Take Wilson's theorem: $$(p-1)!\equiv-1\bmod p$$ Of course, we can subtract $p$ from the LHS and the congruence will not change: $$(p-1)!-p\equiv-1\bmod p$$ This is equivalent to $$\frac{(p-1)!-p+1}p=\frac{(p-1)!-(p-1)}p\in\mathbb Z$$ and the claim is proved.