Determining a number's last three digits How would one go about finding the last 3 digits of a given number? For example, in my textbook, I'm asked to find the last $3$ digits of $2^{251}-1$ and also of $2^{756839}-1$. Can anyone tell me the procedure to do so? Perhaps we can make an example of the former, and then I can solve the latter? 
Thank you guys! 
 A: You have to compute first the value of $2^{251}\bmod 1000$. Since $1000=8\times 125$, which are coprime, we can recover it from the value of $2^{251}\bmod 125$ with the Chinese Remainder theorem. Here are the tools, with some details:
We have an isomorphism:
$$\mathbf Z/1000\mathbf Z\simeq \mathbf Z/8\mathbf Z\times \mathbf Z/125\mathbf Z,$$
and from a Bézout's relation
$$47\cdot 8-3\cdot125=1,$$
we deduce the inverse isomorphism:
$$(\alpha\bmod 8,\beta\bmod125)\longmapsto 47\cdot 8\beta-3\cdot125\alpha\bmod1000.$$
This yields us the value of $2^{251}\mod 1000$ as soon as we know its value $\bmod 8$ and $\bmod 125$. Naturally, its value $\bmod 8$ is $0$.
Now, as $\varphi(5^3)=5^2\cdot 4=100$ and $2$ and $125$ are coprime, we have $2^{100}\equiv 1\mod125$, and $2^{251}\equiv 2^{51}\mod 125$.
We can check $2^{50}\equiv-1\mod125$ by the Fast Exponentiation algorithm, hence $2^{51}\equiv -2\mod 125$. Or we can note   $2^7=128\equiv 3\mod 125$, hence $$2^{51}\equiv 3^7\cdot 4\equiv3^5\cdot9\cdot4\equiv-7\cdot9\cdot4=-252 \equiv-2 \mod125.$$
Thus we obtain
$$2^{251}\equiv -94\cdot 8=-752\equiv 248\mod1000,$$
and the last three digits of $2^{251}-1$ are $\;\color{red}{247}$.
Similar method for $2^{756839}-1$,  which reduces to $2^{39}\mod 125$.
