# c^2 = a^2 + b^2 + ab and its solutions

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?

Here are some thoughts, too long for a comment.

You need to assume that $a$ and $b$ are coprime, otherwise there are infinitely many solutions with the same square-free part for $ab$ (scaling does not change it). Assuming $a$ and $b$ are coprime, bounding the square-free part of $ab$ is the same as requiring that $a$ (resp. $b$) lies in finitely many square classes of the form $\alpha x^2$ (resp. $\beta y^2$). Hence your problem is equivalent to showing that an equation of the form $z^2=\alpha^2 x^4+\alpha\beta x^2y^2+\beta^2 y^4$ has finitely many integer solutions with coprime $x$ and $y$. This leads to rational points on certain elliptic curves (divide both sides by $y^4$). Infinitely many solutions (for a given $\alpha$ and $\beta$) can only exist if the elliptic curve $s^2=t^4+\gamma t^2 + \gamma^2$ has positive rank (where $\gamma=\beta/\alpha$), but I don't see how to proceed from here.

If we also required that $c$ lies in finitely many square classes (i.e. the square-free part of $abc$ is bounded), then we would be lead to rational points on a curve of the form $\alpha^2 x^4+\alpha\beta x^2y^2+\beta^2 y^4=1$. This must have genus 3, hence Faltings' Theorem should show (non-effectively) that there are only finitely many solutions. That is, the square-free part of $abc$ does tend to infinity (non-effectively) over primitive solutions $(a,b,c)$, but I don't know how to prove the same for the square-free part of $ab$.

• It seems like GH should get the credit for the answer; I would have liked to check both answers as good. Thank you both very much for your time and expertise. Commented May 19, 2012 at 1:09

Continuing GH's thoughts, for $\alpha = 1$ and $\beta = 5$, the (Jacobian) elliptic curve (of) $z^2 = x^4 + 5 x^2 y^2 + 25 y^4$ has rank 1 and therefore infinitely many rational points, which correspond to coprime triples $(x,y,z)$ of integers solving the equation. Then setting $a = x^2$, $b = 5 y^2$ and $c = z$, one obtains infinitely many (and therefore arbitrarily large) solutions with $\mbox{sqres}(ab) = 5$. Some of them are $$(1,0,1), (0,5,5), (16,5,19), (25,80,95), (53361, 115520, 149521), \dots$$

(Not all of them are coprime, but there will be infinitely many coprime $(a,b,c)$ triples among them.)

• To answer the question about squarefree part 10 explicitly: for both $(\alpha,\beta) = (1,10)$ and $(2,5)$, the group of rational points on the relevant elliptic curve has rank 1, so there will be infinitely many solutions. Commented May 18, 2012 at 19:02
• Thank you for clarifying this. What I did not realize is that $z^2 = x^4 + 5 x^2 y^2 + 25 y^4$ can be regarded as an elliptic curve. Can you explain this more? For example, what is this curve in more familiar Weierstrass form? Or are you just saying that dividing by $y^4$ and putting $s:=z/y^2$, $t:=x/y$ we obtain a rational point on $s^2=t^4+5t^2+25$, and conversely, any rational point $(s,t)$ on the latter curve can be written as $(z/y^2,x/y)$ for some integers $(x,y,z)$? Commented May 19, 2012 at 5:49
• We can consider an equation of the form $z^2 = f(x,y)$ with $f$ homogeneous of degree 4 as describing a curve in the weighted projective plane with coordinates $x,y,z$ of weights $1,1,2$, respectively (i.e, we identify points $(\xi,\eta,\zeta)$ and $(\lambda\xi,\lambda\eta,\lambda^2\zeta)$. If $f$ has no multiple factors, this is a smooth curve of genus 1, so choosing one of its rational points (say, $(1,0,\alpha)$ in our case; in general, rational points don't have to exist, though) as origin, the curve becomes an elliptic curve. The transformation you mention relates the curve to ... Commented May 19, 2012 at 9:34
• ... one of its affine patches (in that case the patch given by $y \neq 0$). An equation in Weierstrass form for the elliptic curve $z^2 = \alpha^2 x^4 + \alpha \beta x^2 y^2 + \beta^2 y^4$ is $$y^2 = x (x + \beta/\alpha) (x - 3 \beta/\alpha)$$. Commented May 19, 2012 at 9:38
• Can you please explain how you got that equation? I worked out a different equation, but I guess the answer is not unique, and I couldn't get the same one you got. Commented May 23, 2012 at 0:45