What is the remainder when 333^{333} is divided by 13?
333^1 mod 13 = 8 (1)
333^2 mod 13 = 12 (2)
333^3 mod 13 = 5 (3)
333^4 mod 13 = 1 (4)
333^5 mod 13 = 8
333^6 mod 13 = 12
.
The pattern has a repeating cycle of 4
So
(333 mod 4) = ( 1 ) = 8
The remainder = 8