<s>[INST] Find the remainder when $140^{67}+153^{51}$ is divided by $17$ Find the remainder when $$140^{67}+153^{51}$$ is divided by $17$.
$$140\equiv 4 \pmod {17}$$
$$67\equiv 16 \pmod{17}$$
$$153 \equiv 0 \pmod{17}$$
$$51\equiv 0 \pmod{17}$$
$$\Rightarrow 140^{67}+153^{51}\equiv 4^{16}+0 \equiv 1\pmod{17}$$
Solution should be $13$. What's wrong?
 [/INST] One has $140\equiv 4\pmod{17}$. Now $4^4=256\equiv 1\pmod{17}$ and $67=16\cdot 4+3$ so
$$140^{67}\equiv (4^4)^{16}\cdot 4^3\equiv 4^3\equiv13 \pmod{17}$$
Similarly one has $153\equiv 0\pmod{17}$ and so $153^{51}\equiv 0\pmod{17}$.
So the answer is indeed $13$
</s>