
Al P. answered 10/21/16
Tutor
0
(0)
Online Mathematics tutor
For forms
ak mod n
if gcd(a,n) = 1 then Euler's Theorem can be applied.
Euler's Theorem: if gcd(a,n) = 1, then ak mod n ≡ ak mod Φ(n) (mod n)
where Φ(n) is Euler's Totient function.
For 252015 mod 18, we have
a = 25
k = 2015
n = 18 (18 = 2•32, to be used below)
[ NOTE: gcd(a,n) = gcd(25,18) = 1 so we can use Euler's Theorem ]
For n = p1k1p2k2 … prkr (n is the product of primes raised to some power,
this is the FTO Arithmetic)
Φ(n) = n(1-1/p1)(1-1/p2) … (1-1/pr)
Φ(n) = Φ(18) = 18*(1-1/2)(1-1/3) = 6
So 252015 mod 18 = 25(2015 mod 6) mod 18
= 255 mod 18 (2015 ≡ 5 (mod 6))
= 9765625 mod 18
= 13