Solution:
Let A=1000a+100b+10c+d. Then we obtain the equality
31(1000a+100b+10c+d)+2000=32(1000d+100c+10b+a)
Multiply both sides by 3 to clear denominators:
1000a+100b+10c+d+6000=2000d+200c+20b+2a
Bring all terms to one side:
1000a+100b+10c+d+6000−2000d−200c−20b−2a=0
Group like terms:
(1000a−2a)+(100b−20b)+(10c−200c)+(d−2000d)+6000=0
998a+80b−190c−1999d+6000=0
998a+80b−190c+6000=1999d
So
1999d+190c=80b+998a+6000
It is clear that d is an even digit and d>2. So we have to investigate three cases:
(i) d=4:
Comparing the last digits in the upper equality we see that a=2 or a=1.
If a=2 then 19c=80, which is possible only when c=0. Hence the number A=2004 satisfies the condition.
If a=7 then 19c−8b=490, which is impossible.
(ii) d=6:
Then 190c+5994=80b+998a. Comparing the last digits we obtain that a=3 or a=8.
If a=3 then 80b+998a<80⋅9+1000⋅3<5994.
If a=8 then 306+998a≥998⋅8=7984=5994+1990>5994+190c.
(iii) d=8:
Then 190c+9992=80b+998a. Now 80b+998a≤80⋅9+998⋅9=9702<9992+190c.
Hence we have the only solution A=2004.