Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How to (dis)prove this

$ (n-2)! \equiv 1 \mod n$

If n is said to be a prime number. I guess we'll have to use FERMAT’S LITTLE THEOREM, and I just don't know where to start from. Thanks in advance

share|improve this question
2  
    
$$n=4\;,\;\;(n-2)!=2!=2\neq 1\pmod 4$$ –  DonAntonio Nov 19 '13 at 16:59
    
but 4 is not a prime number! –  Bledi Boss Nov 19 '13 at 16:59
    
What have you tried ? –  Kasper Nov 19 '13 at 16:59
    
Exactly @BlediBoss, so your claim is false unless you require $\;n\;$ to be a prime. Check my answer. –  DonAntonio Nov 19 '13 at 17:00

1 Answer 1

up vote 6 down vote accepted

If $\;n=p\;$ is a prime, then by Wilson's theorem

$$\color{red}{-1}=(p-1)!=(p-2)!(p-1)=\color{red}{-(p-2)!\pmod p}\implies 1= (p-2)!\pmod p$$

share|improve this answer
    
I forgot to ask, how did you make that pass, I mean how do you eliminate $ (p-1) $ –  Bledi Boss Nov 19 '13 at 18:54
    
@BlediBoss , $\;p-1=-1\pmod p\;$ , of course. –  DonAntonio Nov 19 '13 at 19:44
    
But do we need a proof for it? –  Bledi Boss Nov 19 '13 at 19:45
1  
@BlediBoss, it folllows directly from the definition of modular equality! $\;a=b\pmod p\iff p\mid (a-b)\;$ , so in our case $\;p-1=-1\pmod p\iff p\mid(-1-(p-1))\iff p\mid p\;$...what, do you think this is trivial or what? :) –  DonAntonio Nov 19 '13 at 19:50
    
Great job buddy. –  Bledi Boss Nov 19 '13 at 19:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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