6
$\begingroup$

My textbook states: If $p$ is a prime, then $(p-1) \equiv -1\pmod p$.

But the online version is $(p-1)! \equiv -1\pmod p$.

Which one is correct?

$\endgroup$
4
  • 25
    $\begingroup$ Both are correct, but the first one is trivial rather than deserving to be named after Wilson. $\endgroup$ Nov 1, 2016 at 10:06
  • 6
    $\begingroup$ Which book is it? $\endgroup$
    – lhf
    Nov 1, 2016 at 11:14
  • $\begingroup$ My book has $(p-2)! \equiv 1 \pmod p$. $\endgroup$ Nov 1, 2016 at 20:31
  • 1
    $\begingroup$ Everything written in textbooks is also modulo possible typos. $\endgroup$ Nov 1, 2016 at 21:36

1 Answer 1

19
$\begingroup$

The second one is Wilson's theorem.

Though the first one is not absurd, since

$$p\equiv 0\pmod p$$

you always have

$$p-1\equiv -1\pmod p$$

whether $p$ is prime or not.

$\endgroup$
3
  • 12
    $\begingroup$ The first one isn't absurd, but calling it "Somebody's Theorem" is. $\endgroup$ Nov 1, 2016 at 11:56
  • 3
    $\begingroup$ @DavidRicherby, by the powers vested in me by the State of Insanity, I'm officially calling $(p − 1) ≡ −1 (\mod p)$ to be "Somebody's Theorem". $\endgroup$ Nov 1, 2016 at 21:32
  • 2
    $\begingroup$ @BenHocking That's absurd! $\endgroup$ Nov 1, 2016 at 22:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .