Find the last two digits of $2015^{2016}-2017$

elementary-number-theory

I proved it by the binomial theorem, $08$.
It is correct but I also tried proving it by modular arithmetic using Fermat's little theorem. I proved till
$2015^{2016} – 2017 = 2017a + 1$

What to do next? Please tell me.

Best Answer

let $$ n = 2015^{2016}-2017 $$ If you reduce everything modulo $100$ you'll get $$n \equiv 15 ^ {2016} - 17 \,\, \text{(mod 100)}$$

To reduce $15^{2016}$ , we calculate $$15^2=125\equiv 25 \,\,\text{(mod $100$)}$$ so $$15^{2016} = 25^{1008}$$ As $25^2 = 625 \equiv 25 \,\,\text{(mod 100)}$, every power of $25$ is equivalent to $25$ (mod 100).

In the end:

$$ \begin{align} n &\equiv 15 ^ {2016} - 17 \,\,&\text{(mod 100)} \\ &\equiv (15^2)^{1008} - 17 \,\,&\text{(mod 100)}\\ &\equiv 25^{1008} - 17 \,\,&\text{(mod 100)}\\ &\equiv 25 -17 \,\,&\text{(mod 100)}\\ &\equiv 8 \,\,&\text{(mod 100)} \end{align} $$

So the last two digits are $08$.

Related Question