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