Consider the expression x2−axy+y2 where x and y are positive integers. I know that if a is an integer, then the expression x2−axy+y2 can be written as a square of an integer for some a. However, I wonder if a is a rational number such that 0<a<1, is it possible to find such an a for which x2−axy+y2 is a square of an integer? If so, what are the conditions on such an a?