I am working on a Geometry problem and have translated it into a Number Theory problem but now I am stuck.
I have an expression of the form:
$$aM^2+bMN+N^2$$
where $a$ and $b$ are positive integer constants that I know the value of.
I am trying to find positive integer values of $M$ and $N$ so the given expression is a perfect square. I know that I can randomly pick values for $M$ and $N$ and hope I get a perfect square but that seems a bit crude.
I was able to complete the square on the given expression and got something of the form:
$$(pM+N)^2 - MN$$
where $p$ is a positive integer but I can’t see how that helps me.
Can anyone suggest an approach to finding values of $M$ and $N$ that will generate perfect squares?