<s>[INST] If the last 3 digits of $2012^m$ and $2012^n$ are identical, find the smallest possible value of $m+n$. 
Let $m$ and $n$ be positive integers such that $m>n$. If the last 3 digits of $2012^m$ and $2012^n$ are identical, find the smallest possible value of $m+n$. 

Since the 100's digit is 0 in both cases, I just did $2012^m \equiv 2012^n \mod 1000$, and got $12^m \equiv 12^n\mod 1000$ but I'm not sure where to go from there. Trying to compute the first few powers of $12$ will only get the numbers larger and the pattern doesn't seem to emerge that soon.
 [/INST] You have $12^m\equiv 12^n\pmod{10^3}$ hence $12^m\equiv 12^n\pmod{2^3}$ and $12^m\equiv 12^n\pmod{5^3}$.
For the latter, we have $12^{m-n}\equiv 1\pmod{5^3}$, hence $m\equiv n\pmod{100}$ because the multiplicative order of $12$  modulo $5^3$ is $100$, as computed here.
On the other hand, $12^n(12^{m-n}-1)\equiv 0\pmod{2^3}$ from which $12^n\equiv 0\pmod{2^3}$ which holds for $n\geq 2$.
Thus $n=2$ and $m=102$ is the smallest solution with sum $m+n=104$.
</s>