-1

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 .

TShiong
  • 1,257
G8N2
  • 1
  • 2
    Since $1000 = 2^3 \cdot 5^3 = 8 \cdot 125$ and $\gcd(8, 125) = 1$, you can reduce the power $!\pmod{8}$ and separately $!\pmod{125}$ (using Euler's generalization of Fermat's Little Theorem) and then combine the results to find the residue $!\pmod{1000}$ using the CRT. – Sammy Black Jan 28 '23 at 07:53

1 Answers1

1

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}.$

calc ll
  • 8,427
  • Please strive not to post more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here (esp. after they have already been closed). – Bill Dubuque Jan 29 '23 at 00:01
  • Note that a CRT based solution is already given here in the dupe. And we already have every possible variation on computing modular powers using Euler etc. – Bill Dubuque Jan 29 '23 at 00:12