Three Two One... Wait, Add Two Thousand

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

What are the last three 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

Satvik Golechha
Sep 28, 2014

[Note that this solution is not mine, I combined Pi Han's and George G's comments for clarity]

Because we're counting the last three digits, we are finding 200 3 200 2 2001 m o d 1000 2003^{2002^{2001}} \bmod 1000

Modular arithmetic: 200 3 200 2 2001 m o d 1000 = ( 2003 m o d 1000 ) 200 2 2001 m o d 1000 = 3 200 2 2001 m o d 1000 2003^{2002^{2001}} \bmod 1000 = (2003 \space \bmod 1000)^{2002^{2001}} \bmod 1000 = 3^{2002^{2001}} \bmod 1000

By Euler's totient function, a ϕ ( x ) ( m o d x ) 1 a^{\phi (x) } \pmod {x} \equiv 1 for coprime positive integers a , x a, x

Because 3 3 and 1000 1000 are coprime positive integers, that is, gcd ( 3 , 1000 ) = 1 \text{gcd} (3,1000) = 1 , we can apply Euler's totient function

The next step is to find 3 200 2 2001 m o d ( ϕ ( 1000 ) ) m o d 1000 \large 3^{2002^{2001} \space \bmod { (\phi(1000)) } } \bmod 1000

To evaluate ϕ ( 1000 ) \phi(1000) , we need to find all the prime factors of 1000 1000 , which are 2 2 and 5 5 , so ϕ ( 1000 ) = 1000 × ( 1 1 2 ) × ( 1 1 5 ) = 400 \phi(1000) = 1000 \times \left ( 1 - \frac {1}{2} \right ) \times \left ( 1 - \frac {1}{5} \right ) = 400

Then, 3 200 2 2001 m o d 400 m o d 1000 \large 3^{2002^{2001} \space \bmod { 400 } } \bmod 1000

Similarly like above, apply modular arithmetic: 200 2 2001 m o d 400 = ( 2002 m o d 400 ) 2001 = 2 2001 m o d 400 2002^{2001} \space \bmod {400} = (2002 \space \bmod {400})^{2001} = 2^{2001} \space \bmod {400}

You maybe tempted to apply the totient function again but note that 2 2 and 400 400 are not coprime. So we need to split the modulo into two (or more) numbers such that exactly one of them is divisible by 2 2

400 = 16 × 25 400 = 16 \times 25

We would like to find 2 2001 m o d 16 2^{2001} \space \bmod {16} and 2 2001 m o d 25 2^{2001} \space \bmod{25} separately

For the first one, because 2 2001 ÷ 2 4 2^{2001} \div 2^4 is obviously an integer, it is simply equals to 0 0

For the second one, we can apply the totient function, 2 2001 m o d ( ϕ ( 25 ) ) m o d 25 \large 2^{2001 \space \bmod { (\phi(25)) }} \space \bmod{25}

Like above, ϕ ( 25 ) = 25 × ( 1 1 5 ) = 20 \phi(25) = 25 \times \left (1 - \frac {1}{5} \right ) = 20

2 2001 m o d 20 m o d 25 = 2 \large 2^{2001 \space \bmod { 20 }} \space \bmod{25} = 2

Apply Chinese Remainder Theorem, you should get 2 2001 m o d 400 = 352 \large 2^{2001} \space \bmod {400} = 352

So after all this simplification, we are left with 3 352 m o d 1000 3^{352} \space \bmod {1000}

3 352 = ( 10 1 ) 176 ( 176 2 ) 1 0 2 ( 176 1 ) 1 0 1 + 1 241 m o d 1000 3^{352} = (10-1)^{176} \equiv {176\choose 2}10^2 - {176\choose 1}10^1 + 1 \equiv 241 \bmod 1000

But why not start with binomial? Let n = 200 2 2001 / 2 = 1001 200 2 2000 n = 2002^{2001}/2=1001\cdot2002^{2000} , then 200 3 200 2 2001 3 2 n = ( 10 1 ) n ( n 2 ) 1 0 2 ( n 1 ) 1 0 1 + 1 m o d 1000 2003^{2002^{2001}} \equiv 3^{2n} = (10-1)^n \equiv {n\choose 2}10^2 - {n\choose 1}10^1 + 1 \bmod 1000 It's easy to show n 0 m o d 4 n\equiv 0 \bmod 4 and n 1 m o d 25 n\equiv 1 \bmod 25 , hence ( n 2 ) 0 m o d 10 {n\choose 2} \equiv 0 \bmod 10 and ( n 1 ) 76 m o d 100 {n\choose 1} \equiv 76 \bmod 100 .

Prateek Sekhsaria
Dec 23, 2013

use thotient function

Excellent solution!!! lol..

Kishan k - 7 years, 5 months ago

I do not understand. Please explain it better. What do you mean by totient function ? Are you referring to one of the theorem using the function? If yes, which ? How did you apply it? Thank you in advance.

Kenny Lau - 7 years, 5 months ago

Log in to reply

Because we're counting the last three digits, we are finding 200 3 200 2 2001 m o d 1000 2003^{2002^{2001}} \bmod 1000

Modular arithmetic: 200 3 200 2 2001 m o d 1000 = ( 2003 m o d 1000 ) 200 2 2001 m o d 1000 = 3 200 2 2001 m o d 1000 2003^{2002^{2001}} \bmod 1000 = (2003 \space \bmod 1000)^{2002^{2001}} \bmod 1000 = 3^{2002^{2001}} \bmod 1000

By Euler's totient function, a ϕ ( x ) ( m o d x ) 1 a^{\phi (x) } \pmod {x} \equiv 1 for coprime positive integers a , x a, x

Because 3 3 and 1000 1000 are coprime positive integers, that is, gcd ( 3 , 1000 ) = 1 \text{gcd} (3,1000) = 1 , we can apply Euler's totient function

The next step is to find 3 200 2 2001 m o d ( ϕ ( 1000 ) ) m o d 1000 \large 3^{2002^{2001} \space \bmod { (\phi(1000)) } } \bmod 1000

To evaluate ϕ ( 1000 ) \phi(1000) , we need to find all the prime factors of 1000 1000 , which are 2 2 and 5 5 , so ϕ ( 1000 ) = 1000 × ( 1 1 2 ) × ( 1 1 5 ) = 400 \phi(1000) = 1000 \times \left ( 1 - \frac {1}{2} \right ) \times \left ( 1 - \frac {1}{5} \right ) = 400

Then, 3 200 2 2001 m o d 400 m o d 1000 \large 3^{2002^{2001} \space \bmod { 400 } } \bmod 1000

Similarly like above, apply modular arithmetic: 200 2 2001 m o d 400 = ( 2002 m o d 400 ) 2001 = 2 2001 m o d 400 2002^{2001} \space \bmod {400} = (2002 \space \bmod {400})^{2001} = 2^{2001} \space \bmod {400}

You maybe tempted to apply the totient function again but note that 2 2 and 400 400 are not coprime. So we need to split the modulo into two (or more) numbers such that exactly one of them is divisible by 2 2

400 = 16 × 25 400 = 16 \times 25

We would like to find 2 2001 m o d 16 2^{2001} \space \bmod {16} and 2 2001 m o d 25 2^{2001} \space \bmod{25} separately

For the first one, because 2 2001 ÷ 2 4 2^{2001} \div 2^4 is obviously an integer, it is simply equals to 0 0

For the second one, we can apply the totient function, 2 2001 m o d ( ϕ ( 25 ) ) m o d 25 \large 2^{2001 \space \bmod { (\phi(25)) }} \space \bmod{25}

Like above, ϕ ( 25 ) = 25 × ( 1 1 5 ) = 20 \phi(25) = 25 \times \left (1 - \frac {1}{5} \right ) = 20

2 2001 m o d 20 m o d 25 = 2 \large 2^{2001 \space \bmod { 20 }} \space \bmod{25} = 2

Apply Chinese Remainder Theorem, you should get 2 2001 m o d 400 = 352 \large 2^{2001} \space \bmod {400} = 352

So after all this simplification, we are left with 3 352 m o d 1000 3^{352} \space \bmod {1000}

Can you carry on from here?

Pi Han Goh - 7 years, 5 months ago

Log in to reply

3 352 = ( 10 1 ) 176 ( 176 2 ) 1 0 2 ( 176 1 ) 1 0 1 + 1 241 m o d 1000 3^{352} = (10-1)^{176} \equiv {176\choose 2}10^2 - {176\choose 1}10^1 + 1 \equiv 241 \bmod 1000

But why not start with binomial? Let n = 200 2 2001 / 2 = 1001 200 2 2000 n = 2002^{2001}/2=1001\cdot2002^{2000} , then 200 3 200 2 2001 3 2 n = ( 10 1 ) n ( n 2 ) 1 0 2 ( n 1 ) 1 0 1 + 1 m o d 1000 2003^{2002^{2001}} \equiv 3^{2n} = (10-1)^n \equiv {n\choose 2}10^2 - {n\choose 1}10^1 + 1 \bmod 1000 It's easy to show n 0 m o d 4 n\equiv 0 \bmod 4 and n 1 m o d 25 n\equiv 1 \bmod 25 , hence ( n 2 ) 0 m o d 10 {n\choose 2} \equiv 0 \bmod 10 and ( n 1 ) 76 m o d 100 {n\choose 1} \equiv 76 \bmod 100 .

George G - 7 years, 5 months ago

Thank you for our clear and precise explanation.

Kenny Lau - 7 years, 5 months ago

This question is the same as the question from Canadial Olympial 2003

Dinesh Chavan - 7 years ago

why is this wrong? we need to find (3^2002^2001)mod1000. but because of euler's totient THEOREM 3^400=1(mod1000) =>3^2000=1(mod1000) =>3^2002=9(mod1000) =>3^2002^2001=9^2001(mod1000) but again because of euler's totient THEOREM 9^400=1(mod1000) =>9^2000=1(mod1000) =>9^2001=9(mod1000) =>3^2002^2001=9(mod1000) PLEASE EXPLAIN!!!!

Adarsh Kumar - 6 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...