Determine all pairs (a,b) of positive integers that satisfy this equation:
lcm(a,b)2 - gcd(a,b)2 = 48
for a=1:2000
for b=a+1:2000
if lcm(a,b)^2-gcd(a,b)^2==48
disp([a,b])
end
end
end
finds only
(1, 7) and (4, 8)
Of course their reversals are also solutions, and this does not guarantee completeness.
|
Posted by Charlie
on 2024-09-22 08:20:24 |