<s>[INST] Find the remainder when $13^{13}$ is divided by $25$. Find the remainder when $13^{13}$ is divided by $25$.
Here is my attempt, which I think is too tedious:
Since $13^{2} \equiv 19 (\text{mod} \ 25),$ we have $13^{4} \equiv 19^{2} \equiv 11 (\text{mod} \ 25)$ and $13^{8} \equiv 121 \equiv 21 (\text{mod} \ 25).$
Finally, we have $13^{8+4} \equiv 13^{12} \equiv  21\times 11 \equiv 231 \equiv 6 (\text{mod} \ 25)$ and hence $13^{13} \equiv 3 (\text{mod} \ 25).$
Is there a less tedious way to find the remainder? Thank you.
 [/INST] We have


*

*$2\cdot 13 = 26 \equiv 1 \mod 25$

*$\Rightarrow 13^{13} \cdot \color{blue}{2^{13}} \equiv 1 \mod 25$

*$\color{blue}{2^{13}} \equiv 2^{10}\cdot 2^3 \equiv -8 \color{blue}{\equiv 17 \mod 25}$
$$\Rightarrow \boxed{13^{13} \equiv 17^{-1} \equiv 3 \mod 25}$$
</s>