To check that $x^{100} - 1$ is divisible by $1000$, it will suffice to check that it is divisible by $8$ and $125$. For each of these, you can use Euler's theorem, which will tell you that $x^{p^{k-1}(p-1)} \equiv 1 \pmod {p^k}$, where $p$ is a prime not dividing $x$. In this particular case, you have $x^{4} \equiv 1 \pmod{8}$ (so in particular $x^{100} \equiv 1 \pmod{8}$) and $x^{100} \equiv 1 \pmod{125}$.
As $\displaystyle2017\equiv17\pmod{1000},2017^m\equiv17^m$ for any integer $m$
Use Carmichael function, $\lambda(1000)=100$
$$\implies17^{(2016^{2015})}\equiv17^{(2016^{2015})\pmod{100}}\pmod{1000}$$
Now $2016\equiv16\implies2016^{2015}\equiv16^{2015}\pmod{100}$
As $(16,100)=4$ let use find $16^{2015-1}\pmod{100/4}$
$16^{2014}=(2^4)^{2014}=2^{8056}$
As $\displaystyle\lambda(25)=\phi(25)=20$ and $8056\equiv16\pmod{20},2^{8056}\equiv2^{16}\pmod{25}$
$2^8=256\equiv6\pmod{25}\implies2^{16}\equiv6^2\equiv11$
$\implies16^{2014}\equiv11\pmod{25}$
$\implies16^{2014+1}\equiv11\cdot16\pmod{25\cdot16}\equiv176\pmod{400}\equiv76\pmod{100}$
$$\implies17^{(2016^{2015})}\equiv17^{76}\pmod{1000}$$
Now $$17^{76}=(290-1)^{38}=(1-290)^{38}\equiv1-\binom{38}1290+\binom{38}2290^2\pmod{1000}$$
Now $\displaystyle38\cdot29=(40-2)(30-1)\equiv2\pmod{100}\implies\binom{38}1290\equiv20\pmod{1000}$
and $\displaystyle\binom{38}229^2=\dfrac{38\cdot37}2(30-1)^2\equiv3\pmod{10}$
$\displaystyle\implies\binom{38}2290^2\equiv3\cdot100\pmod{10\cdot100}$
Best Answer
Theorem: If $b$ and $c$ are non-negative natural numbers, $m$ and $a$ are co-prime, $b = c\enspace\text{mod}\,\varphi(m)$, then $a^b = a^c\enspace\text{mod}\,m$.
Proof: Without loss of generality, suppose that $b>c$. Then $b=c+k\cdot\varphi(m)$ where $k$ is a natural number. $$a^b = a^{c+k\cdot\varphi(m)} = a^c\cdot (a^{\varphi(m)})^k = a^c \enspace\text{mod}\,m$$
Where we used Euler's theorem for $a^{\varphi(m)} = 1\enspace\text{mod}\,m$, and the fact that $$a'=a''\enspace\text{mod}\,m\,\land\,b'=b''\enspace\text{mod}\,m\implies a'b'=a''b''\enspace\text{mod}\,m$$
End of proof.
Suppose we want to calculate $a^{a^{320}}$ modulo $1000$. We can first calculate $a^{320}$ modulo $\varphi(1000)=400$ since $a$ and $1000$ are co-prime, using the theorem above.
To calculate $a^{320}$ modulo $400$, we can calculate $320$ modulo $\varphi(400)=160$, because, again, $400$ and $a$ are co-prime.
$$320 = 0\enspace\text{mod}\,160 \implies a^{320} = 1\enspace\text{mod}\,400 \implies a^{a^{320}}=a\enspace\text{mod}\,1000 $$ And because $a=531\enspace\text{mod}\,1000$, then $$a^{a^{320}}=531\enspace\text{mod}\,1000 $$