Find all possible positive integers (p,q) with p≤q such that (q³+1)/(pq-1) is an integer.
Let f = (q^3+1)/(pq-1) [f>0]. Then rewrite the equation as q^3+1 = (pq-1)*f.
If q=2 then q^3+1 is odd and then both factors must be odd.
If q>=3 then f = -1 (mod q). This is due to congruence mod q of the equation which yields 1 = (-1)*f (mod q).
Let f = nq-1 [n>0]. This satisfies the congruence above for q>=3 and satisfies being odd for q=2.
Then q^3+1 = (pq-1)*(nq-1). Rearranging and dividing each side by q yields: q^2 - p*n*q + p + n = 0.
Applying the quadratic fomula yields q = (p*n +/- sqrt[(p*n)^2 - 4*(p+n)])/2
q will be an integer when (p*n)^2 - 4*(p+n) is a perfect square. (p*n+1)>(p+n) for p,n >= 2.
If p*n >= 7, both of the following inequalities are true:
(p*n)^2 > (p*n-2)^2 - 8 > (p*n-3)^2
(p*n)^2 > (p*n)^2 - 4*(p+n) > (p*n)^2 - 4*(p*n+1) = (p*n-2)^2 - 8
Combining these inequalites yields: (p*n)^2 > (p*n)^2 - 4*(p+n) > (p*n-3)^2 So, if p*n >= 7, then the only perfect square values of (p*n)^2 - 4*(p+n) are (p*n-1)^2 and (p*n-2)^2.
If (p*n)^2 - 4*(p+n) = (p*n-1)^2 then 4p + 4n = 2pn - 1, which is false for all integers.
If (p*n)^2 - 4*(p+n) = (p*n-2)^2 then 0 = 4, which is false.
Therefore p*n must be less than 7.
The pairs (p,n) with 1<=p<=n<=6 which (p*n)^2 - 4*(p+n) is a square are: (1,5), (2,2), (2,3).
These pairs generate nine solutions (p,q) = (1,2), (1,3), (5,2), (5,3), (2,2), (2,1), (2,5), (3,1), (3,5).
Edited on May 27, 2007, 12:57 am