For any prime p and a positive integer n, let νp(n) be the largest nonnegative integer k for which pk divides n. Taking νp on both sides of the given equation, we get νp(a)+νp(b)=2⋅∣νp(a)−νp(b)∣ which means νp(b)νp(a)∈{3,31} for all primes p. Using this with a,b≤100, we get that - We must have (ν2(a),ν2(b))∈{(0,0),(1,3),(3,1),(2,6),(6,2)} because a and b cannot be divisible by 27. - We must have (ν3(a),ν3(b))∈{(0,0),(1,3),(3,1)} because a and b cannot be divisible by 36>100. - a and b cannot be divisible by any prime p≥5, because if not, then one of a and b must be divisible by p3≥53>100. If (ν2(a),ν2(b))=(2,6) (and similarly with (6,2) ), then we must have (a,b)=(4,64), so the sum is 68 . If (ν3(a),ν3(b))=(1,3) (and similarly with (3,1) ), then we must have ν2(b)≤1 (otherwise, b≥ 22⋅33>100). Hence, the optimal pair is (a,b)=(23⋅31,21⋅33)=(24,54), so the sum is 24+54=78. If neither of the above happens, then a+b≤21+23≤10, which is clearly not optimal. Hence, the optimal pair is (24,54), and the answer is 78 .