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$
  • 25
    $\begingroup$ Both are correct, but the first one is trivial rather than deserving to be named after Wilson. $\endgroup$ – Tobias Kildetoft Nov 1 '16 at 10:06
  • 6
    $\begingroup$ Which book is it? $\endgroup$ – lhf Nov 1 '16 at 11:14
  • $\begingroup$ My book has $(p-2)! \equiv 1 \pmod p$. $\endgroup$ – I. J. Kennedy Nov 1 '16 at 20:31
  • 1
    $\begingroup$ Everything written in textbooks is also modulo possible typos. $\endgroup$ – Count Iblis Nov 1 '16 at 21:36
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$
  • 12
    $\begingroup$ The first one isn't absurd, but calling it "Somebody's Theorem" is. $\endgroup$ – David Richerby Nov 1 '16 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$ – Ben Hocking Nov 1 '16 at 21:32
  • 2
    $\begingroup$ @BenHocking That's absurd! $\endgroup$ – David Richerby Nov 1 '16 at 22:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.