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.

I was wondering what the best way was to find the last digit of the largest known Mersenne prime $2^{6972593} - 1$? Is there any logical way to do this or will I have to just some how compute the answer and then find the last digit?

share|improve this question

3 Answers 3

up vote 9 down vote accepted

The answer is yes, there is in fact a "logical" (i.e. simple) way to do this! When computing the last digit of a number, we only need to consider the number mod 10 (that is, we only need to compute its remainder when divided by 10). So let's do that!

We see the powers of $2 \pmod{10}$ cycle nicely:

$2^1 \equiv 2 \pmod{10}$

$2^2 \equiv 4 \pmod{10}$

$2^3 \equiv 8 \pmod{10}$

$2^4 \equiv 6 \pmod{10}$

$2^5 \equiv 2 \pmod{10}$

$2^6 \equiv 4 \pmod{10}$

...etc.

And now the pattern appears obvious. Since the powers of $2$ mod 10 repeat every 4 numbers, we only need to compute $6972593 \pmod 4$. This is simply $1$, and so $2^{6972593} \equiv 2^1 \pmod{10}$ and so it ends in a $2$. Thus, $2^{6972593}-1$ ends in $\boxed{1}$, as desired.

Ask me if you don't understand anything :)

share|improve this answer
1  
Excellently explained. Thanks! –  Jeel Shah Aug 24 '12 at 18:09

All you need to know is the answer modulo $10$. The powers of $2$ mod $10$ have an obvious pattern: $2, 4, 8, 6, 2, 4, 8, 6, ...$ which has a period of $4$, and since $6972593 \equiv 1 (\bmod 4)$, $$2^{6972593} - 1 \equiv 2 - 1 = 1 (\bmod 10).$$

share|improve this answer

$2^4 \equiv 1 \mod 5 \Rightarrow 2^{M4+1} \equiv 2 \mod 5 \,.$

Now, (this is the Chinese Remainder Theorem in a hidden form)

$$2^{6972593} -1\equiv 1 \mod 5 \mbox { and odd} \Rightarrow 2^{6972593} -1\equiv 1 \mod 10 \,.$$

Alternately

$$2^{6972593} -2= 2[(2^4)^m-1]=2 \cdot [(2^4)-1][2^4{m-1}+2^4{m-2}+...+2^4+1]=2 \cdot 5 \cdot 3 \cdot \mbox{junk}$$

Since $2^{6972593} -2$ is divisible by 10, you get the same result.

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.