# How can I prove the last digit of $(2^{121985292}-1)$ is $5$

• i think that if $P=2^{121985292}-1$, then your problem is equivalent to shown that $P\equiv 5\pmod{10}$.
– cand
Dec 14, 2014 at 0:51

$2^1$ ends in $2$

$2^2$ ends in $4$

$2^3$ ends in $8$

$2^4$ ends in $6$

$2^5$ ends in $2$

$2^{4k}$ ends in $6$.

Notice your number is a multiple of four since its last two digits make up a number multiple of $4$. so $2^{121985292}$ ends in $6$.

By Fermat's Little Theorem, $2^4 \equiv 1 \pmod{5}$

so $\rightarrow 2^{(4 * 530496323)} \equiv 1 \pmod{5}$

$2^{2121985292} - 1 \equiv 1 -1 \equiv 0\pmod{5}$

and is odd.

• Shouldn't it be $0\mod 5$? Dec 14, 2014 at 0:58
Notice that 121985292 is divisible by 4. This makes the expression $16^{(121985292 /4)}-1$. As $x^n-1$ is divisible by $x-1$, the given expression is divisible by $15=16-1$. So the expression is also divisible by $5$. Since the value of given expression is clearly odd, it does not end with $0$ but $5$.
Since $2$ is relatively prime to $5$, by Fermat's Little Theorem, $2^4 \equiv 1 \pmod{5}$. Hence $2^{4k} \equiv 1 \pmod{5}$, where $k$ is a positive integer. Since $121985292$ is divisible by $4$ (by its last 2 digits), $2^{121985292} \equiv 1 \pmod{5}$. Hence $2^{121985292} \equiv 0 \pmod{5}$.
Now we have to make sure that it is odd. Since $2$ raised to any power is even, $1$ less than it is odd, so $2^{121985292}-1$ is odd and its last digit is $5$. (odd and divisible by 5 $\rightarrow$ last digit is 5).