We will discuss the following three cases for n and m.
(i) In the case when n<m, from an+203≥am+1, we have
202≥am−an≥an(a−1)≥a(a−1).
Therefore, 2≤a≤14.
When a=2, we can take n to be 1,2,…,7.
When a=3, we can take n to be 1,2,3 and 4.
When a=4, we can take n to be 1,2 and 3.
When 5≤a≤6, we can take n to be 1 and 2.
When 7≤a≤14, n=1.
From am+1∣an+203, we can deduce that the solutions are (2,2,1),(2,3,2) and (5,2,1).
(ii) In the case when n=m, am+1∣202. Since 202 has only four divisors 1, 2, 101 and 202, but a≥2, m≥2 and am+1≥5, so am=100 or 201. Since m≥2, therefore the solution is (10,2,2).
(iii) In the case when n>m, from am+1∣203(am+1), we have
am+1∣an+203−(203am+203),
that is,
am+1∣am(an−m−203).
Since (am+1,am)=1, so
am+1∣an−m−203.
① If an−m<203, then set n−m=s≥1, we have am+1∣203−as. Hence
203−as≥am+1,202≥as+am≥am+a=a(am−1+1)≥a(a+1),
thus
2≤a≤13.
Using the same argument as in Case (i), we show that the solutions for (a,m,s) are:
(2,2,3),(2,6,3),(2,4,4),(2,3,5),(2,2,7),(3,2,1),(4,2,2),(5,2,3) and (8,2,1).
Hence, (a,m,n) are
(2,2,5),(2,6,9),(2,4,8),(2,3,8),(2,2,9),(3,2,3),(4,2,4),(5,2,5) and (8,2,3).
② If an−m=203, then a=203 and n−m=1, and the solution is
(203,m,m+1), m≥2.
③ If an−m>203, set n−m=s≥1, then am+1∣as−203.
Since as−203≥am+1, so s>m. By
am+1∣as+203am=(as−m+203)am=(an−2m+203)am,
and
(am+1,am)=1,
we have
am+1∣an−2m+203.
Now s>m⇔n−m>m⇔n>2m⇔n−2m>0. In this case, the solutions can only be derived from the preceding solutions, that is, from (a,m,n)→(a,m,n+2m)→⋯→(a,m,n+2km), and each solution derived also satisfies am+1∣an+203.
Summarizing what described above, we obtain all solutions (a,m,n) to be:
(2,2,4k+1), (2,3,6k+2), (2,4,8k+8), (2,6,12k+9),
(3,2,4k+3), (4,2,4k+4), (5,2,4k+1), (8,2,4k+3),
(10,2,4k+2) and (203,m,(2k+1)m+1),
where k is any nonnegative integer, and m≥2 is an integer.