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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

By Wilson's Theorem, we know that p divides (p-1)!+1.

Assume there exists another prime d divides (p-1)!+1 and $d<p$.

Then $ (p-1)!\equiv-1\mod(d)$.

I am not sure if I am right in the following statement:

Thus, d is not a factor of (p-1)!, which means d is not any of the {1,2,...,p-1} and this contradicts with the fact that $d<p$

share|cite|improve this question
I think your argument is correct. +1 – DonAntonio Dec 3 '13 at 11:14
up vote 1 down vote accepted

Your solution is correct, and a slightly different approach (which ammounts to the same you wrote)


(1) Wilson's Theorem

(2) For any prime $\;q\;,\;\;q<p\;$ , we have that $\;q\mid (p-1)!\implies q\nmid \left[(p-1!+1\right]\;$ ...

share|cite|improve this answer
Wow, thank you so much! – walterudoing Dec 3 '13 at 11:17
@walterudoing, it is considered a nice thing in this site to upvote any answer that you find helpful. After a while, you can accept the best of all answers. – DonAntonio Dec 3 '13 at 12:26

Your Answer


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.