Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

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

Is $2^{340} - 1 \equiv 1 \pmod{341} $?

This is one of my homework problem, prove the statement above. However, I believe it is wrong. Since $2^{10} \equiv 1 \pmod{341}$, so $2^{10 \times 34} \equiv 1 \pmod{341}$ which implies $2^{340} - 1 \equiv 0 \pmod{341}$

Any idea?


share|cite|improve this question
I think you have a typo: mod 34 should be mod 341. – Fixee Feb 28 '11 at 7:41
@Fixee: Thanks, fixed. – Chan Feb 28 '11 at 7:49
2^10x341 should be 2^10x34, right? – ypercubeᵀᴹ Feb 28 '11 at 12:26
@ypercube: you're right. Thanks, fixed. – Chan Mar 1 '11 at 0:56
up vote 5 down vote accepted

What you wrote is correct. $$2^{340}\equiv 1\pmod {341}$$ This is smallest example of a pseudoprime to the base two. See Fermat Pseudo Prime.

share|cite|improve this answer
Thanks for the confirmation as well as the information about Fermat Pseudo Prime. – Chan Feb 28 '11 at 7:16

HINT $\rm\ \ 2^{340}\equiv 2\ \ (mod\ 11\cdot31)\ \Rightarrow\ mod\ 11\::\ 2^{339}\equiv 1\equiv 2^{10}\ \Rightarrow\ 2^{gcd(339,10)} \equiv 1\:,\:$ i.e. $\ 2\equiv 1\ \Rightarrow\Leftarrow$

share|cite|improve this answer

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.