Now my calculator needs a painkiller

200 3 200 2 2001 \Large 2003^{2002^{2001}}

Find the last 3 digits of the above number.


The answer is 241.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Image Image

Moderator note:

Good application of Euler's Theorem.

I used carmicheal's function to get it . Nice problem

Aditya Kumar - 5 years, 2 months ago

Log in to reply

I dont know about that function.

where can i learn about it?

Rishabh Deep Singh - 5 years, 2 months ago
Nilav Rudra
Mar 20, 2016

241

If the units digit of a number N is 3, then the units digit of N^2 will be 9, for N^3 it will be 7, for N^4 it will be 1 and then it will repeat (N^5 will be 3 again, N^6 will be 9 again and so on).

For the last two digits, it will repeat after 20 iterations (so if N^1 ends with 03, then N^21 also ends with 03 and if N^1 ends with 13, then N^21 also ends with 13). For the last three digits, it will repeat after 100 iterations.

So, now we need to find 2002^2001 mod 100 (since it repeats after the 100th iteration). Fortunately, we can employ a similar trick. The last two digits where are new number M ends in 2 will repeat after 20 iterations (with one small caution coming up), just like with the 3s. So, 2002^2001 is going to go through the cycle of 20 one hundred times and then it will be back to 1 again. Now, we can calculate that it should follow the pattern of the first number and end in 02. However, if you run this trial with 2s, we find that the first one ends with 02, but M^21 ends with 52 (M^2 and M^22 will both end in 04 and all the rest follow the same pattern except for this very first number which locks into 52 after the first iteration). So, the last two digits of 2002^2001 are 52.

Now, that means that the last three digits of 2003^2002^2001 will be the same as 3^52. Now, 3^12 will end with 441, 3^32 will end with 841 and then 3^52 will end with 241.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...