The equation $c^2 = a^2 + b^2 + ab$ is the law of cosines for a triangle with integer sides $a$, $b$, and $c$, and a 120 degree angle opposite side $c$. By the substitution $x = (a-b)/2$, $y = (a+b)/2$ it can be transformed to $x^2 + 3y^2 = 4z^2$, which is a more familiar equation, whose solutions are given in parametric form on page 353 (Corollary 6.3.15) of Cohen, Number Theory volume I. That parametrization doesn't seem to answer my question, though.

Define the "square residue" of $x$ to be the product of (one power each of) all the primes dividing x to an odd power. For example, the square residue of 80 is 5 and the square residue of 40 is 10. What I want to show is that for given $N$, there is some bound $K$ such that all solutions with square residue of $(ab) <= N$ have $a$ and $b$ at most $K$. Since $b$ can be bounded in terms of $a$ it's enough to have $a$ at most $K$ if that is easier.

In other words, how can we rule out HUGE solutions $a$ and $b$ with teeny-weeny $sqres(a,b)$? I've investigated this numerically. Here are the solutions with $sqres(a,b) <= 100$ and $a,b \le 6120$.

\begin{verbatim} (3, 5, 7) sqres(ab) = 15 (5, 16, 19) sqres(ab) = 5 (7, 8, 13) sqres(ab) = 14 (9, 56, 61) sqres(ab) = 14 (11, 24, 31) sqres(ab) = 66 (16, 39, 49) sqres(ab) = 39 (19, 80, 91) sqres(ab) = 95 (32, 45, 67) sqres(ab) = 10 (32, 175, 193) sqres(ab) = 14 (33, 800, 817) sqres(ab) = 66 (35, 288, 307) sqres(ab) = 70 (49, 575, 601) sqres(ab) = 23 (64, 735, 769) sqres(ab) = 15 (65, 3136, 3169) sqres(ab) = 65 (75, 112, 163) sqres(ab) = 21 (225, 37856, 37969) sqres(ab) = 14 (704, 92575, 92929) sqres(ab) = 77 (725, 131043, 131407) sqres(ab) = 87 (819, 1600, 2131) sqres(ab) = 91 (847, 3200, 3697) sqres(ab) = 14 (3179, 19200, 20971) sqres(ab) = 33 (3825, 15488, 17713) sqres(ab) = 34 (3887, 4800, 7537) sqres(ab) = 69 (4312, 4563, 7687) sqres(ab) = 66 \end{verbatim}

Do we know that if we keep going, we're not going to get another solution with sqres = 10?

By the way, does the "square residue" already have another name, perhaps well-known to number theorists?