TITLE: $\left (14^{2014} \right )^{2014} \mod 60$ without a calculator
QUESTION [9 upvotes]: 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?

REPLY [2 votes]: Carmichael's function for $60$ is lcm$(\phi(4),\phi(3),\phi(5))=$ lcm$(2,2,4)=4$, so $a^k \equiv a^{k+4}$ once all possible prime factors of $60$ have been accumulated. So we can quickly square $14$ twice and see where it's going:
$$
14^2 = 196 \equiv 16 \bmod 60 \\
14^4 \equiv 16^2 = 256 \equiv 16 \bmod 60
$$
So we are fortunate here, and $14^{2k} \equiv 16^k \equiv 16 \bmod 60$. No need to worry about the second exponentiation, except to observe that the resulting exponent is certainly even.