Is $2^{340} - 1 \equiv 1 \pmod{341} $? 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?  
Thanks,  

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.
