What is the remainder when 5^30*4^30 is divided by 7?
5^30 * 4^30 =
(5 * 4)^30 =
20^30
Note that
20^1 mod 7 = 6
20^2 mod 7 = 1
20^3 mod 7 = 6
20^4 mod 7 = 1
So......it appears that
20^(2n) mod 7 = 1
So
20^(2 * 15) mod 7 = 20^30 mod 7 = 1