Last two digits of $3^{7^{2016}}$ I need help with solving this Algebra problem:
Find the last two digits of $3^{7^{2016}}$.
Preferably using Euler's theorem.
 A: First observe that the last two digits of powers of $3$ repeat with a cycle of $20$ elements:
$$1,3,9,27,81,43,29,87,61,83,49,47,41,23,69,7,21,63,89,67,\ldots$$
Then it's sufficient to find the last two digits of $7^{2016}$ to arrive at the answer. The last two digits of powers of $7$ repeat with a cycle of $4$:
$$1,7,49,43,\ldots$$
Therefore
$$7^{2016} \mod 100 \equiv 7^{2016 \mod 4} = 1$$
and
$$3^{7^{2016}} \mod 100 \equiv 3^{7^{2016} \mod 100} \equiv 3^1 \mod 100 = 3.$$
It follows that the last two digits of $3^{7^{2016}}$ are $03$.
A: Last two digits of $7^{2016}$ are $01$.
Hence $7^{2016} = 20n+01$
$3^{20n+1} = 03 \mod 100$.
Hence the last two digits are $03$.
A: As $7\equiv-1\pmod4,7^{2016}\equiv1$
$$3^{4m}=(10-1)^{2m}=3(1-10)^{2m}\equiv1-\binom{2m}1\cdot10^1\pmod{100}\equiv1-20m$$
$$\implies3^{4m+1}\equiv3-60m\pmod{100}\ \ \ \ (1)$$
Here $m=\dfrac{7^{2016}-1}4$
Now $7^2=50-1,7^4=(50-1)^2\equiv1\pmod{20},2016\equiv0\pmod4$
$\implies7^{2016}\equiv1\pmod{20}\implies7^{2016}-1\equiv0$
$\implies\dfrac{7^{2016}-1}4\equiv0\pmod{\dfrac{20}4}\implies5|(7^{2016}-1)$
From $(1),60m$ divisible by $60\cdot5$
Can you take it from here?
A: Using Carmichael function, $\lambda(100)=\cdots=20$
$\displaystyle\implies3^{\left(7^{2016}\right)}\equiv3^{\left(7^{2016}\pmod{20}\right)}\pmod{100}$
Again using Carmichael function, $\lambda(20)=4\implies7^4\equiv1\pmod{20}$
$\displaystyle\implies7^{2016}\equiv7^{2016\pmod4}\pmod{20}\equiv7^0\equiv1$
Can you take it from here?
