<s>[INST] Find the least nonnegative residue Find the least nonnegative residue of $5^{18} \mod 11$. 
To do this I took $5^2 \equiv 3 \mod 11$. Then I did $(5^2)^5 \equiv 3^5 \mod 11$. And $3^5 \equiv 1 \mod 11$. 
So now I have $5^{10} \equiv 1 \mod 11$. Then I multiplied both sides by $5^8$ to get $5^{18} \equiv 5^8 \mod 11$.  So I believe $5^8$ is the least nonnegative residue but I am not entirely sure. Can someone please confirm that this is correct?
 [/INST] ${\rm mod}\ 11\!:\ 2^{18} 5^{18}\equiv 10^{18}\equiv (-1)^{18}\!\equiv 1,\ $ so $\ 5^{18}\!\equiv 2^{-18}\!\equiv 2^2 (2^5)^{-4}\equiv 2^2(-1)^{-4}\!\equiv 2^2$
</s>