Calculate $6^{1866}$ in $\mathbb{Z}_{23}$
$Solution:$ Note that $1866=22\cdot 84 + 18$ then by Fermat's theorem
$$[6^{1866}]=[6^{22}]^{84}[6^{18}]=[1]^{84}[6^{18}]=[6^{18}]$$ Then $6^6=46656=2028\cdot 23 + 12$ It is true that $$[6^{1866}]=[6^6]^3=[-11]^3=[121][-11]=[72]=[3]$$
So $ 6 ^ {1866} $ is $3 $ in $ \mathbb {Z} _ {23} $, is that correct? Thank you for reading.