how do i find the remainder of 10^400 divided by 17?
Thanks!$
Thanks!$
-
If you raise 10 to a set of powers, it will cycle through a repeating set of values modulo 17. You could do this the long way - calculate 10^2 = 100 === 9 mod 17, 10^4 === 9^2 === 13 mod 17, 10^8 = 13^2 === 16 mod 17, etc... but there's a better way.
Euler's theorem states that for a prime number p:
a^(p-1) === 1 mod p
Therefore, 10^16 === 1 mod 17, and
10^400 = (10^16)^25 = 1^25 mod 17 = 1 mod 17
The remainder will be 1!
Euler's theorem states that for a prime number p:
a^(p-1) === 1 mod p
Therefore, 10^16 === 1 mod 17, and
10^400 = (10^16)^25 = 1^25 mod 17 = 1 mod 17
The remainder will be 1!
-
use the long step method