www.mathpages.com/home/kmath334.htm
We can generalize the proposition to cover positive integers of the form x^2 + Kxy + y^2  = N 1 + xy for all integers N greater than K, where K is a positve integer not equal to 2. If we try to prove that every integer N (greater than K) given by this equation is a square, we can proceed just as before, except that now, depending on the value of K, it is possible to have x,y with opposite signs yielding an integer value of N greater than K. We excluded the case K=2 because in that case we can achieve ANY value of N by setting y=1 and x=N1. This is not ruled out by the "descent" argument because all these cases descend back to the pair 1,1, which gives the indeterminate 0/0, and allows for any value of N. So, excluding that special case, let X,Y denote the absolute values of x and y, and observe that if x and y have opposite signs the expression for N can be written in the form X^2 + Y^2  K N = K   XY1 which shows that x^2 + y^2 must be less than K in order for N to exceed K. Thus there are just a finite number of pairs (x,y) with opposite sign that can yield a value of N greater than K. The smallest possible pair is 1,2 (which is equivalent to 2,1), in which case we have N = (52K)/1, which we require to be greater than K. Hence, any integer value of N (greater than K) must be a square for K = 0, 1, 3, 4, or 5. For K=6 the pair 1,2 gives N=7, so every integer value of N greater than 6 is either a square or equal to 7. More generally, every value of K greater than 5 allows the pair 1,2, so we always have the N value of N = 2K5. However, in this particular case the "exceptional" N value also happens to be a square, so we can say that any integer N greater than 7 is a square. This occurs for K = 7, 15, and 115, so the nonnegative integers K such that every positive integer N of the form (x^2 + Kxy + y^2)/(1+xy) greater than K is a square is 0, 1, 3, 4, 5, 7, 15, 115 The number of minimal pairs x,y with opposite sign yielding integer values of N tends to increase as K increases, but it appears that there are infinitely many K for which the only reduced pair is 1,2. For example, every term greater than 10 must not be divisible by 2, because otherwise it would give an integer N for (3K10)/2 based on the pair 1,3. Likewise from the pair 2,2 we see that every term greater than 8 must not be congruent to 2 modulo 3, because otherwise it would give an integer N for (4K8)/3. Here is a short table of the expressions that must not be integers for sufficiently large "prime K" values 1 2 3 4 5 1  (2K5)/1 (3K10)/2 ( 4K17)/ 3 ( 5K26)/ 4 2 (4K8)/3 (6K13)/5 ( 8K20)/ 7 (10K29)/ 9 3 (9K18)/8 (12K25)/11 (15K34)/14 4 (16K32)/15 (20K41)/19 5 (25K50)/24 In each case the expression (AKB)/(A1) implies that for K values greater than B we must exclude those such that K = B (mod A1). In other words, the sieve excludes every number greater than q = x^2 + y^2 congruent to q mod (xy1).
