EulerFermatTheorem AIME Difficult
2011


Problem - 250
Let $R$ be the set of all possible remainders when a number of the form $2^n$, where $n$ is a non-negative integer, is divided by $1000$. Let $S$ be the sum of the elements in $R$. Find the remainder when $S$ is divided by $1000$.

Answer     7

We want to find two distinct integer $i < j$ such that $2^i\equiv 2^j\pmod{1000}$. If so, then it is sufficient to find the remainders of $2^0$, $2^1$, $2^2$, $\cdots$, $2^{j-1}$ MOD $1000$ in order to get the answer.

The condition $2^i\equiv 2^j\pmod{1000}$ is equivalent to $2^i\equiv 2^j\pmod{8}$ and $2^i\equiv 2^j\pmod{125}$.

For MOD $8$, we note that for any integer $k \ge 3$, it always hold that $2^k\equiv 0\pmod{8}$.

By # 4191, we know the multiplicative order of $2$ modulo $125$ is $100$. Therefore we can conclude that $2^1$, $2^2$, $\cdots$, $2^{100}$ should all have different residues modulo $125$. This is because if there exist positive integer $m < n \le 100$ such that $2^m\equiv 2^n\pmod{125}$, we will have $2^{n-m}\equiv 1\pmod{125}$ and $n-m < 100$.

Combining these two results gives $2^{3}\equiv 2^{103}\pmod{1000}$. It follows that $$S\equiv 2^0 + 2^1 +\cdots +2^{102}\equiv 2^{103}-1\equiv 2^3 -1\equiv \boxed{7}\pmod{1000}$$

report an error