32022=(32)1011
(32)1011≡(−1)1011(mod5)
(−1)1011=−1
Now we know that a remainder of −1 is not the standard way. So to convert a negative remainder back to a positive one, we can just add the divisor (5):
Hence, 32022≡4(mod5)
Alternative Method 1:
Using Fermat's Little Theorem: ap−1≡1(modp)
So, we can say, 35−1≡34≡1(mod5)
Now, 2022=4×505+2
Hence, we can say, 32022=34×505+2=(34)505×32
32022≡(1)505×32(mod5)
32022≡1×9(mod5)
32022≡4(mod5)
Alternative Method 2:
We can also find the pattern.
31≡3(mod5)
32=9≡4(mod5)
33=27≡2(mod5)
34=81≡1(mod5)
35=243≡3(mod5)
So the cycle repeats: 3, 4, 2, 1
Exponent is 2022.
Hence, 2022÷4=505 with a remainder of 2
Since the remainder is 2, the result would be same as the second position in our cycle (32≡4(mod5)).