Determine all possible integer pairs (p,q) such that p+q²+s³=pqs, where s=gcd(p,q) and gcd denotes the greatest common divisor.
If gcd(p,q)=s, then we can write p=as, q=bs, with gcd(a,b)=1. Replacing, as+b²s²+s³= abs³, so a+b²s+s²= abs², and then (ab-1)s²-b²s-a=0. The positive solution is (b²+√(b^4+4a(ab-1)))/(2ab-2), so necessarily b^4+4a(ab-1) must equal r² for integer r. (This is not a sufficient condition, by the way.)
I checked Charlie's results, and fortunately they agree with this condition, but I couldn't solve it directly, or prove that there are no more possibilities.
Edited on June 21, 2007, 11:18 am