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 5 of 8: Euler's theorem bounds the multiplicative order
In plain words

The order of an element always divides the group's exponent, here φ(125) = 100.

φ(125)=100  ⇒  1978100≡1(mod125),ord125(1978)∣100\varphi(125)=100 \;\Rightarrow\; 1978^{100}\equiv 1 \pmod{125},\quad \mathrm{ord}_{125}(1978)\mid 100
Detailed analysis

Euler's theorem gives 1978φ(125)≡1(mod125)1978^{\varphi(125)}\equiv 1\pmod{125} with φ(125)=100\varphi(125)=100, so the least n−mn-m satisfying the congruence is the multiplicative order ord125(1978)\mathrm{ord}_{125}(1978), which must divide 100100.