The conversation between human and AI assistant.
Find the remainder when 50^51 is divided by 53?
How did you calculate that?
I used Fermat's Little Theorem, which states that if p is a prime number and a is an integer not divisible by p, then a^(p-1) is congruent to 1 (mod p). In this case, p is 53 and a is 50, so we have 50^(53-1) is congruent to 1 (mod 53). Then we can simplify 50^51 as 50^(50+1) and use the property that a^b * a^c is equal to a^(b+c), which gives us (50^50 * 50^1) mod 53. We can then use the fact that 50^(52) is congruent to 1 (mod 53) because of Fermat's Little Theorem, so we have (50^50 * 50^1) mod 53 = (50^50 * 50^1 * 50^1) mod 53 = (50^52 * 50) mod 53 = 1 * 50 mod 53 = 47.