For what integer values of $k$ does $a^{2}+b^{2}=kc^{2}$ have positive integer solutions

diophantine equationspythagorean triples

The obvious case of $k=1$ clearly has solutions, for example, $(3,4,5)$ and $(5,12,13)$, among others. Trivially, it has infinitely many solutions by multiplying through by any number. It has infinitely many solutions aside from those that can be parametrized by $(2nm,n^{2}-m^{2},n^{2}+m^{2})$ for all $n,m\in\mathbb{Z}$. This is a well-known result.

The case of $k=2$ also has infinitely many solutions, among them $(1,7,5)$. As in the previous example I can simply multiply through by any number and get another valid triple. At some point just after Christmas I had worked out a parametrization (using the method of finding a rational point on the corresponding circle), but I cannot recall it off the top of my head. It was not much more complicated than for the case of $k=1$, however, and I sincerely doubt that I was the first one to have found it.

The case of $k=3$ is one for which I have been unable to find any solutions, but I cannot think of a proof that it has no solutions. I cannot find any rational points on the circle $x^{2}+y^{2}=3$, but that does not mean that those points do not exist.

The case of $k=4$ has solutions as well. Given $a^{2}+b^{2}=4c^{2}$, merely allow $d=2c$ and we return to the case of $k=1$ with the question of finding triples that satisfy $a^{2}+b^{2}=d^{2}$. This shows that the original question that I posed is equivalent to merely asking which squarefree integers $k$ have solutions.

I have similarly found solutions in the case of $k=5$, for example, $(11,2,5)$. Try as I might, I have found nothing for the cases of $k=6$ or $k=7$. The cases of $k=8$ and $k=9$ have solutions by a similar argument as the previous paragraph.

Initially, my guess was that there no solutions iff $k\cong3\mod4$ given my inability to find solutions in the $k=3$ and $k=7$ cases, until I decided to look at the $k=6$ case as well and found that I was similarly stumped. I feel like there's something else obvious that I'm overlooking, but whether it's solutions for the cases I can't find a solution for or some other connection between these numbers, I don't have a clue.

My apologies if this has been asked before, I couldn't find anything when I did a google search.

Best Answer

The sum of two squares theorem tells you that for a given integer $k$, the equation $$a^2+b^2=kc^2,$$ has a solution in positive integers if and only if $k$ does not have a prime factor $p\equiv3\pmod{4}$ with odd multiplicity. That is, if $k=\prod p^{v_p}$ is the prime factorization of $k$, then there exist solutions if an only if $v_p\equiv0\pmod{2}$ whenever $p\equiv3\pmod{4}$.

Related Question