<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] $\!\bmod 25\!:\ 13\equiv \overbrace{2^{\large -1}\!\equiv 3^{\large -3}}^{\Large 2\ \, \equiv\,\ 3^{\LARGE 3}}$ $\Rightarrow 13^{\large 13}\!\equiv 3^{\large -39}\!\equiv 3,\ $ by $\ 3^{\large 40}\!\equiv\!\!\! \overbrace{(3^{\large \color{#c00}{20}})^{\large 2}\!\equiv 1}^{\large\quad\ \  \color{#c00}{20}\ =\ \phi(25)}$ 
</s>