Last 3 digits

What are the last 3 digits of

12 3 456 ? 123 ^ { 456 } ?


The answer is 561.

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

Alan Yan
Oct 5, 2015

x = 12 3 456 x = 123^{456} We want to find x x in modulo 1000.

Since ϕ ( 8 ) = 4 \phi(8) = 4 , we know that x 1 (mod 4) x \equiv 1 \text{ (mod 4)} Since ϕ ( 125 ) = 100 \phi(125) = 100 , we know that x 61 (mod 125) (Calculations left to reader however it is very helpful to consider 123 as -2) x \equiv 61 \text{ (mod 125) (Calculations left to reader however it is very helpful to consider 123 as -2)}

Using the chinese remainder theorem, we get that x 561 (mod 1000) x \equiv 561 \text{ (mod 1000) } therefore yielding an answer of 561 \boxed{561} .

Actually, the 12 3 456 ( m o d 125 ) 123 ^ { 456} \pmod{125} is where it gets interesting. It could be very painful, or it could be a pleasant breeze.

Hint: The numbers were not randomly chosen, despite appearances.

Calvin Lin Staff - 5 years, 8 months ago

Log in to reply

By Euler, this simplifies to 12 3 56 ( 2 ) 56 ( 128 ) 8 3 8 123^{56} \equiv (-2)^{56} \equiv (128)^{8} \equiv 3^8 and from here it is easy.

Alan Yan - 5 years, 8 months ago

Log in to reply

Precisely! For those who didn't notice that 123 2 123 \equiv -2 , this problem became painful. Likewise, 56 = 7 × 8 , 2 7 = 128 56 = 7 \times 8, 2^7 = 128 would simplify the working further. Thanks for sharing!

BTW I'm hosting a wiki collaboration party on Finding the last few digits of a power this Saturday at 8am PDT. Would you be able to contribute?

Calvin Lin Staff - 5 years, 8 months ago

@Calvin Lin , I used Eulers theorem as we know totient of 1000 is 400 , the above number gets reduced to 12 3 56 123^{56} modulo 1000 and then some calculations , it gets bit tedious too ...Please do reply for this method...

A Former Brilliant Member - 5 years, 4 months ago

Log in to reply

As stated in my comment "It could be very painful, or it could be a pleasant breeze".

You chose the painful approach. See Alan's solution for the pleasant breeze.

Calvin Lin Staff - 5 years, 4 months ago

Log in to reply

@Calvin Lin haha yeah !

A Former Brilliant Member - 5 years, 4 months ago

@Calvin Lin the last digit of 12 3 456 \displaystyle 123 ^ { 456 } will return 3 6 = 729 3 ^ { 6 } = 729 as 9.

. . - 2 months, 3 weeks ago

What is ϕ \phi in your solution?

. . - 2 months, 3 weeks ago

Log in to reply

It's the eulers totient function

Calvin Lin Staff - 2 months, 2 weeks ago
Ankit Kumar Jain
Mar 21, 2017

12 3 456 ( 12 3 2 ) 228 12 9 228 ( 130 1 ) 228 13 0 2 × ( 228 2 ) 130 × 228 + 1 561 ( m o d 1000 ) 123^{456}\equiv\left(123^{2}\right)^{228}\equiv129^{228}\equiv(130 - 1)^{228}\equiv130^{2}\times{228\choose{2}} - 130\times228 + 1\equiv561\pmod{1000}

123^2=129. hahaha. what a coincidence ans is same

Vibhor Chandak - 2 years ago

Log in to reply

@Vibhor Chandak How 12 3 2 = 129 \displaystyle 123 ^ { 2 } = 129 ?

It is ( 100 + 23 ) 2 = 10 0 2 + 2 × 100 × 23 + 2 3 2 = 10000 + 4600 + 529 = 15129 \displaystyle ( 100 + 23 ) ^ { 2 } = 100 ^ { 2 } + 2 \times 100 \times 23 + 23 ^ { 2 } = 10000 + 4600 + 529 = \boxed { 15129 } .

Not 129 129 .

. . - 2 months, 2 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...