Problem - 2617
For every integer $n$, let $m$ denote the integer made up of the last four digit of $n^{2015}$. Consider all positive integer $n < 10000$, let $A$ be the number of cases when $n > m$, and $B$ be the number of cases when $n < m$. Compute $A-B$.
The answer is $\boxed{0}$.
$\underline{\textbf{Solution 1}}$
If $a+b=10000$, then $a+b \mid a^{2015}+b^{2015}$. This means the sum of the last four digits of $a$ and $b$ equal 10000. Therefore it is every pair of $a$ and $(10000-a)$ create a symmetrical pair.
$\underline{\textbf{Solution 2}}$
$$m\equiv n^{2015}\pmod{1000} \implies (10000-n)^{2015}\equiv -m^{2015} \pmod{10000}$$