Let n be a factor of 1995
(a
^{2}+b
^{2})/(ab) = n
(a
^{2}+b
^{2}) = n*(ab)
a
^{2}na+ b
^{2}+nb = 0
which is quadratic in a so
a=[n±√(n²4(b²+nb))]/2
For each value of n there are only a few values of b that yield real solution so from there I went brute force and got the same list as Charlie.
Note: Only multiples of 5 seem to have solutions. I plan to look a little deeper.

Posted by Jer
on 20130904 13:28:20 