MathLabs

Problem 1

Let mm and nn be positive integers with 1≤m<n1 \le m < n. In their decimal representations, the last three digits of 1978m1978^m are equal, respectively, to the last three digits of 1978n1978^n. Find mm and nn such that m+nm+n has its least value.
Step 1 of 8: Translate the digit condition into a congruence
In plain words

"Same last three digits" is just congruence mod 1000 in disguise.

1978n≡1978m(mod1000)  ⟺  1978m(1978 n−m−1)≡0(mod1000)1978^n \equiv 1978^m \pmod{1000} \iff 1978^m\left(1978^{\,n-m}-1\right)\equiv 0 \pmod{1000}
Detailed analysis

Two positive integers have the same last three decimal digits exactly when their difference is a multiple of 10001000. Applying this to 1978n1978^n and 1978m1978^m and factoring out 1978m1978^m gives the equivalent multiplicative condition.