Modding an exponent with a large mod

192 Views Asked by At

How can I calculate $$24^{43}\mod 85$$ with few steps? I've tried splitting it up into $$24^{43}\mod 5$$ and $$24^{43}\mod 17$$ and then solving with the Chinese Remainder Theorem, but it still requires a lot of steps. I'm wondering if there's an easier way to calculate it.

1

There are 1 best solutions below

2
On BEST ANSWER

Note that $3\cdot 85=255$ and $2^8=256\equiv 1\pmod{85}$ and $3^4=81\equiv -4\pmod{85}$ so that $$24^{43}=3^{43}\cdot 2^{3\cdot 43}=(3^4)^{10}\cdot 3^3\cdot (2^8)^{16}\cdot 2\equiv (-4)^{10}\cdot 54=(2^8)^2\cdot 2^4\cdot 54=23\cdot 8=184\equiv\boxed{14}$$ A few more steps than necesary are shown for detail, but the idea is to use $2^8\equiv 1$ as much as possible.