Find the last three digits of $17^{256}$ using modular arithmetic .
My attempt :
We need to take $\pmod{1000}$ but it seems really tedious. Also, I don't know how to apply chinese remainder theorem here .
Find the last three digits of $17^{256}$ using modular arithmetic .
My attempt :
We need to take $\pmod{1000}$ but it seems really tedious. Also, I don't know how to apply chinese remainder theorem here .
By twiddling, or the extended Euclidean algorithm, $17^{-1}\mod{1000}$ is $353.$
By Euler's theorem, $17^{400}\equiv 1\pmod {1000}.$ So $17^{256}\equiv 17^{-144}\equiv 353^{144}\equiv (353^2)^{72}\equiv609^{72}=881^{36}\equiv 161^{18}\equiv 921^9\equiv(-79)^9\equiv (-39)^3\equiv-319\equiv 681\pmod {1000}.$ Here I used a hand held calculator for the repeated squaring.
Let's try with the Chinese remainder theorem.
$17^{256}\equiv (17^4)^{64}\equiv 1^{64}\equiv 1\pmod 8$ by Euler's theorem.
$17^{256}\equiv 17^{56}\equiv 39^{28}\equiv 21^{14}\equiv (-59)^7\equiv -59(-19)^3\equiv-59(-16)\equiv56\pmod {125},$ by Euler again.
Now Bezout: $(-3)(125)+(47)8=1.$
Putting it together, we get $(-3)(125)(1)+(47)(8)(56)\equiv-375+56\equiv-319\equiv 681\pmod{1000}.$