0
$\begingroup$

My attempt: From Wilson's Theorem: For a prime $p$,

$$(p-1)! \equiv (-1) \pmod p$$

Multiplying both sides by $(p-2)$,

$$(p-2)! \equiv -(p-2) \pmod p$$ i.e. $$(p-2)! \equiv 2 \pmod p$$

So the remainder is 2. But the answer is given to be 1. So where am I wrong?

EDIT: after being pointed out where I was wrong in the comment (THANK YOU!), I see:

$$(p-1)(p-2)! \equiv (-1) \pmod p$$ i.e. $$(-1)(p-2)! \equiv (-1) \pmod p$$ i.e. $$(p-2)! \equiv (1) \pmod p$$

So the remainder is 1. Thank you! :)

$\endgroup$
  • 2
    $\begingroup$ You multiplied $(p-1)!$ by $p-2$ and got $(p-2)!$. That is not correct. $\endgroup$ – André Nicolas Oct 11 '14 at 5:31
1
$\begingroup$

As $p-1=p-2+1,(p-2)\cdot (p-1)!\ne (p-2)!$

and in fact $(p-1) \cdot (p-2)!=(p-1)!$

But $p-1\equiv-1\implies(-1)\cdot (p-2)!\equiv-1\implies (p-2)!\equiv1$

$\endgroup$
  • $\begingroup$ Wish I know the mistake $\endgroup$ – lab bhattacharjee Oct 11 '14 at 5:34
  • $\begingroup$ Me too. Let me know if you see it. $\endgroup$ – ILoveMath Oct 11 '14 at 5:34

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.