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.

Prove $(n -1) = (n-1)^{n}$ mod n

How would one go about doing this?

share|improve this question
1  
What if n = 4? 3^4 = 1 not 3 –  quanta Apr 7 '11 at 14:00
    
why not just accept TonyK's answer? It is a valid/useful answer for the question as stated. Because other users have contributed content, I'm reluctant to delete the question. –  Willie Wong Apr 7 '11 at 14:33
    
@willie, I have now done so, thanks. –  Cavenaghi Apr 7 '11 at 14:40

1 Answer 1

up vote 6 down vote accepted

But this is just

$-1 = (-1)^n \mod n$

which is true if and only if $n$ is odd or $n = 2$.

share|improve this answer

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.