(PARI) is(k) = {my(upto=100, q=0, x=k^2-4, y=2*k^2+4*k); for(b=1, upto, for(c=1, b, if(issquare(x*(b^2+c^2)+y*b*c), q=1))); q; } (PARI) isprobably(k) = {my(q=0); if((k+1)%4>1, g=gcd(k^2-4, 2*k^2+4*k); x=(k^2-4)/g; y=(2*k^2+4*k)/g; g=core(g); if(g>1, for(b=1, g, for(c=b, g, if((x*(b^2+c^2)+y*b*c)%g==0 && gcd([g, b, c])==1, q=1))), q=1)); q; } Note: if is(k) = 0, there may be a solution (a, b, c) with a >= b >= c > 100. In this case, you can change "upto=100" in the code to "upto=10^4", and then run the program again. If isprobably(k) = 1, there may still be no integer solutions. For examole, isprobably(25) = 1, but there are no integer sulutions to a^2 - 25*(b+c)*a + b^2 + c^2 - 25*b*c = 0 with gcd(a, b, c) = 1. Proof: discriminant D_a = 27*(23*(b^2+c^2) + 50*b*c) is a square, hence we can assume that D_a = 81*m^2. Therefore, 23*b^2 + 50*c*b + 23*c^2 - 3*m^2 = 0 and D_b = 12*(32*c^2 + 23*m^2). If c is divisible by 3, then b is also divisible by 3 and (a/3, b/3, c/3) is a set of solution. So just consider the case of c == 1 or 2 (mod 3). D_b can't be a square because 32*c^2 + 23*m^2 == 1 or 2 (mod 3). In conclusion, there's no integer m such that D_a is a square, which means that there are no integer sulutions to 25 = (a^2 + b^2 + c^2)/(a*b + b*c + c*a). k | [a, b, c] ---+--------------- 1 | [1, 1, 1] 2 | [4, 1, 1] 5 | [41,5, 3] 10 | [71, 5, 2] 14 | [71, 3, 2] 17 | [377, 17, 5] 26 | [418, 13, 3] 29 | [1169, 23, 17] 37 | [1861, 31, 19] 50 | [1708, 19, 15] 62 | [622, 7, 3] 65 | [4817, 65, 9] 74 | [3637, 31, 18] 77 | [8033, 57, 47] 82 | [4523, 32, 23] 98 | [1277, 8, 5]