1. Reduce the bases modulo 7
First, divide the base numbers by 7 to find their remainders:
2021=7×288+5⟹2021≡5≡−2(mod7)
2022=7×288+6⟹2022≡6≡−1(mod7)
2. Evaluate the first term
Substitute the reduced base into the first term:
(2021)2022≡(−2)2022(mod7)
Since the exponent is even, the negative sign disappears:
(−2)2022=22022
By Fermat's Little Theorem, since 7 is a prime number:
26≡1(mod7)
Now, divide the exponent 2022 by 6:
2022=6×337+0
Therefore:
22022=(26)337≡1337≡1(mod7)
3. Evaluate the second term
Substitute the reduced base into the second term:
(2022)2021≡(−1)2021(mod7)
Since the exponent 2021 is an odd number, any negative base raised to an odd power remains negative:
(−1)2021=−1≡6(mod7)
4. Combine the results
Add the two evaluated remainders together:
(2021)2022+(2022)2021≡1+(−1)(mod7)
1−1=0