Calculate without a calculator:
$\left (14^{2014} \right )^{2014} \mod 60$
I was trying to solve this with Euler's Theorem, but it turned out that the gcd of a and m wasn't 1.
This was my solution so far (also doesn't really work without a calculator):
Prime factorization of 60:
$60 = 2^{2}\cdot 3\cdot 5$
Chinese Remainder Theorem setup:
$\left (14^{2014} \right )^{2014} \mod 4\\$
$\left (14^{2014} \right )^{2014} \mod 3\\$
$\left (14^{2014} \right )^{2014} \mod 5\\$
Euler's Theorem:
$\phi \left ( 4 \right ) = 2$
$\Rightarrow 14^{2}\equiv 1 \mod 4$
Whoops, that's not right because gcd(14,4) is not 1, but 2. Euler's Theorem only works when gcd(a,m) = 1.
I don't know how else to solve this, does anyone have an idea?