If x and y are positive integers, L:
LCM of x and y, G:
GCD of x and y, then solve the following equations for x and y values:
1) x
y=L
G, L>x.
2) x
2+y
2 = L
2+G
2, L>x>G.
Let a = x/G, b = y/G
Then L = Gab.
Substituting into equation 1 yields
(Ga)^(Gb) = (Gab)^G
Simplifying,
(Ga)^b = Gab
(Ga)^(b-1) = b
The only integral solutions are is b =2, Ga = 2
and b = 1. But if b = 1, then Ga = x = L, which is ruled out by the problem.
If b = 2, then
G = 1, a = 2 does not lead to a solution, because this leads to
x = 2, y = 2, but the GCD of 2 and 2 is 2, not 1
So the only solution is G = 2, a = 1, b = 2
Then x = 2, y = 4, L = 4, G = 2.