SOLUTION: I need help using modular arithmetic to find the last two digits of a big number, for example 142^291 or something. I know how to use modular arithmetic to find the units digit, bu

Algebra ->  Divisibility and Prime Numbers -> SOLUTION: I need help using modular arithmetic to find the last two digits of a big number, for example 142^291 or something. I know how to use modular arithmetic to find the units digit, bu      Log On


   



Question 615553: I need help using modular arithmetic to find the last two digits of a big number, for example 142^291 or something. I know how to use modular arithmetic to find the units digit, but not the last two digits. I'm only a beginner at modular arithmetic, and would like to get better at it.

Answer by jim_thompson5910(35256) About Me  (Show Source):
You can put this solution on YOUR website!
142 = 42 (mod 100)

142^2 = 142*142 = 42*42 = 1764 = 64 (mod 100)

144^4 = (144^2)^2 = 64^2 = 4096 = 96 (mod 100)

144^8 = (144^4)^2 = 96^2 = 9216 = 16 (mod 100)

144^16 = (144^8)^2 = 16^2 = 256 = 56 (mod 100)

144^32 = (144^16)^2 = 56^2 = 3136 = 36 (mod 100)

144^64 = (144^32)^2 = 36^2 = 1296 = 96 (mod 100)

144^128 = (144^64)^2 = 96^2 = 9216 = 16 (mod 100) ... Notice that there's a pattern starting to emerge

144^256 = (144^128)^2 = 16^2 = 256 = 56 (mod 100)
-------------------------------------------------------

So

142^2 = 64 (mod 100)

144^4 = 96 (mod 100)

144^8 = 16 (mod 100)

144^16 = 56 (mod 100)

144^32 = 36 (mod 100)

144^64 = 96 (mod 100)

144^128 = 16 (mod 100)

144^256 = 56 (mod 100)

-------------------------------------------------------

142^291 (mod 100)

142^(256 + 32 + 2 + 1) (mod 100)

( 142^256 ) * ( 142^32 ) * ( 142^2 ) * ( 142^1 ) (mod 100)

( 56 ) * ( 36 ) * ( 64 ) * ( 42 ) (mod 100)

5419008 (mod 100)

8 (mod 100)


Therefore 142^291 = 8 (mod 100)


So the last two digits of 142^291 are 08