Calculate $6^{1866}$ in $\mathbb{Z}_{23}$ 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.

Your work is correct. 
You could have also said $6^{1866}\equiv6^{-4}\bmod23$.
$6^{-1}\equiv4$ and $4^4=256\equiv3\bmod 23.$
