2

Find the last $3$ digits of $17^{256}$

So I went about solving this using Euler's totient function.

So I had changed it to $17^{40 \cdot6} (17^{16})$ then I reduced and had $1\cdot17^16(\mod1000)$ then I simplified and changed it to $(17^4)^4 (\mod 1000)$ then simplified to $(521^2)^2 (\mod1000)$ then simplified to $(441)^2 (\mod1000)$ then I got $481 (\mod1000)$. Is that answer correct?

Lil
  • 2,529

2 Answers2

3

$17^2=289$;

$17^4 = 289^2 \equiv 521 (\bmod ~ 1000)$;

$17^8 = (17^4)^2 \equiv 521^2\equiv 441 (\bmod ~ 1000)$;

$17^{16} = (17^8)^2 \equiv 441^2\equiv 481 (\bmod ~ 1000)$;

...

$17^{256} = (17^{128})^2 \equiv 41^2 \equiv 681 (\bmod ~ 1000)$.

So, last $3$ digits are $681$.

Oleg567
  • 17,295
3

The last $3$ digits of $17^{256}$ essentially implies $17^{256}\pmod{1000}$

Now, $\displaystyle17^{256}=(17^2)^{128}=(290-1)^{128}$ $$=(1-290)^{128}=1-\binom{128}1290^1+\binom{128}2290^2\pmod{1000}$$

Again, $\displaystyle\binom{128}129^1=128\cdot29\equiv28(30-1)\pmod{100}\equiv840-28=12\pmod{100}$

$\displaystyle\implies\binom{128}1290^1\equiv12\cdot10\pmod{100\cdot10}\equiv120\pmod{1000}$

and $\displaystyle\binom{128}229^2\equiv\frac{128\cdot127}2\cdot(30-1)^2\pmod{10}\equiv8$

$\displaystyle\implies\binom{128}3290^2\equiv8\cdot10^2\pmod{10\cdot10^2}\equiv800\pmod{1000}$

So, the result will be $800-120+1\pmod{1000}$