what are the last two digits of $2016^{2017}$? My answer to this question was 56 but a lot of my friends got 36 and I just want to be certain. Please don't shut the question down or anything.
 A: $2016^{2017}=(2000+16)^{2017}$ so the last two digits of $2016^{2017}$ are completely determined by $16^{2017}$. The last two digits of powers of $16$ cycle between $16\to 56\to 96\to 36\to 76\to 16$. Since $2017\equiv 2\pmod{5}$ the last two digits are $56$.
A: Of course $2016^{2017} \equiv 16^{2017} \pmod{100}$.
Now $16^{2017} = 2^{4\cdot2017}$. Since $2^{22} = 4\,194\,304 \equiv 4 = 2^2\pmod{100}$, we can reduce the exponent modulo $20$, as long as we don't go below $4$.
But $4\cdot 2017\equiv 4\cdot 17 = 68 \equiv 8 \pmod{20}$ and $8\ge 4$. Given that $2^8 = 256 \equiv 56 \pmod{100}$, the last two digits of $2016^{2017}$ are $56$.
A: The last two digits of any expression like this are determined by looking for the remainder over a multiple of $100$. This is modular arithmetic, which you should investigate if you don't already know it. So to calculate the last two digits we can work "$\bmod 100$", casting out multiples of $100$. This also means that we can do this to  the base, $2016$, and just consider the result of $16^{2017} \bmod 100$ . Note that the exponent, $2017$, is an operation count so we can't immediately modify this under the same rule.
It becomes obvious if you start calculating this that the result cycles in a fixed-length loop, which is the order of $16$ modulo $100$:
$$\begin{align}
16^1 &\equiv 16 \bmod 100\\
16^2 &\equiv 16\cdot16 \equiv 256\equiv 56 \bmod 100\\
16^3 &\equiv 56\cdot16 \equiv 896\equiv 96 \bmod 100\\
16^4 &\equiv 96\cdot16 \equiv 1536 \equiv 36 \bmod 100\\
16^5 &\equiv 36\cdot16 \equiv 576 \equiv 76 \bmod 100\\
16^6 &\equiv 76\cdot16 \equiv 1216 \equiv 16 \bmod 100\\
\end{align}$$
which then repeats $\{56,96,36,76,16\}$ for all subsequent terms.
Indeed you must always get some kind of loop because there are only a limited number of values available, and once you repeat one value the subsequent results must also repeat. You'll see, in other answers, techniques for knowing how long those loops are without directly calculating them. We can get that, for any integer base, the order  $\bmod 100$ must divide $10$, which is borne out here since $5$ divides $10$.
So we know that the value of $2016^{2017}$ depends on where $2017$ falls in that $5$-cycle. $2017 \equiv 2 \bmod 5$, which corresponds to $56$ in the cycle.
A: Work mod 100, of course, using $\phi(100)=40$:
$$2016^{2017} \equiv 16^{17} \equiv 2^{68} \equiv 2^{28} \equiv 2^{10}2^{10}2^{8}
\equiv 24\cdot 24 \cdot 56 \equiv (24\cdot 4)(3\cdot 2 \cdot 56) \equiv (-4)3(12)
\equiv -144 \equiv 56 (\bmod{100})$$
A: Another way by successive reductions of exponent with $2016=2^5\cdot3^2\cdot7$
$$2016^{2017} \equiv 16^{2017}\equiv 16(16)^{2^5\cdot3^2\cdot7}\equiv16(36)^{7\cdot2^5} \pmod{100}\\2016^{2017} \equiv 16^{2017}\equiv16(96)^{2^5}\equiv16(36)^4\equiv16\cdot16\equiv56\pmod{100}$$
Thus as the OP says the last two digits are $56$.
A: Note $\ {\rm mod}\ \color{#c00}{25}\!:\ 16^{\large 5}\!\equiv {2^{\large 20}\!\equiv 1}\,$ by Euler $\phi\ $ (or by $\,2^{\large 10}\! = 1024\equiv -1)$ 
So  $\ \ {\rm mod}\ 100\!:\!\!\!\!\!\!\!\underbrace{16\cdot 16^{\large 5}\equiv 16}_{\begin{align}&\large \text{ true mod $\color{#c00}{25}$ and mod $4$}\\ &\ \large \text{hence true mod $100$} \end{align}}\!\!\!\!\!\!\!\!\!\!\color{#0a0}\Longrightarrow16\cdot 16^{\large 5N}\!\!\equiv 16\,$ $\overset{\large \times 16}{\Rightarrow}$ $\,16^{\large 2+5N}\!\!\equiv 16^{\large 2}\!\equiv 56$

Remark  $\ $ The $\rm\color{#0a0}{green}$ arrow follows from the general fact that the solution set $S$ of $\,16x\equiv 16\,$  is closed under multiplication so, by an obvious induction, is also closed under powers (therefore $\,16^{\large 5}\in S\Rightarrow 16^{\large  5N}\!\in S).$ Proof:  $\,x,x'\in S$ $\Rightarrow$  $16x\equiv 16\equiv 16x'$ so $\,16(xx')\equiv (16x)x'\!\equiv 16x'\!\equiv 16\,$ hence $\,xx'\in S.\,$ This monoid structure is often useful, e.g. see this answer where explain how it underlies the natural inductive proof (which above arises by multiplying $ 16^{\large 5N}\!\!\equiv 16\ $ by $\,16^{\large 5})$.
