Are there any solutions for $a, b, c$ such that:

$$a, b, c \in \Bbb N_1$$ $$\sqrt{a^2+(b+c)^2} \in \Bbb N_1$$ $$\sqrt{b^2+(a+c)^2} \in \Bbb N_1$$ $$\sqrt{c^2+(a+b)^2} \in \Bbb N_1$$

  • 2
    $\begingroup$ Is there a reason you would expect such examples exist? $\endgroup$ – Michael Burr Dec 21 '15 at 21:42
  • $\begingroup$ @Rasmus What is the purpose of this problem? $\endgroup$ – user266519 Dec 21 '15 at 21:44
  • 1
    $\begingroup$ No, I don't know if they exist. $\endgroup$ – Rasmus Dec 21 '15 at 21:45
  • 1
    $\begingroup$ I'm making math problems. $\endgroup$ – Rasmus Dec 21 '15 at 21:48
  • 2
    $\begingroup$ I know one thing: if $(a,b,c)$ is a primitive solution, then exactly one of $a$, $b$, and $c$ is odd, and the even numbers among them are divisible by $4$. $\endgroup$ – Batominovski Dec 21 '15 at 22:05

$(108,357,368),(216,714,736)$ and its permutations are the unique solutions of your equation in positive integers below $1000$ (found using a computer search). Of course the latter triple is just a constant multiple of the former one. By multiplying by a constant we can find infinite number of solutions, but so far I have found only one primitive solution (i.e. with coprime numbers).

Edit: I have extended the range and I found one more primitive solution: $(564,748,1425)$. Right now I have looked at all triples with $a\leq b\leq c,a\leq 1000,b\leq 1500,c\leq 2000$.

Edit 2: Following Batominovski's suggestion on how to speed up calculation, I have ran a search with range $a\leq 3000$ odd, $b\leq c,b\leq 3000,c\leq 4000$ divisible by $4$ and here is the list of solutions in that range, in order of apprearance:

$$(357,108,368)\\ (975,348,2380)\\ (1071,324,1104)\\ (1425,564,748)\\ (1785,540,1840)\\ (2499,756,2576)$$

Here is the code I have used (quite ugly, I know):


using namespace std;

long int main(){
    for(double a=1;a<3000;a+=2){
    for(double b=4;b<3000;b+=4){
    for(double c=b;c<4000;c+=4){
    return getch();
  • $\begingroup$ I think there is no other way do find these answers except a computer search, so +1. $\endgroup$ – SalmonKiller Dec 21 '15 at 22:00
  • 1
    $\begingroup$ Thank you for the answer! What is computer search and what kind of program did you use. @Wojowu $\endgroup$ – Rasmus Dec 21 '15 at 22:05
  • $\begingroup$ This problem can be asked in the form of three integer length lines that arranged in any permutation form a right triangle, which sounds counter-intuitive but the fact there is an answer is pretty impressive. Anyhow I wonder if there is a geometric approach that gives more insight. $\endgroup$ – Red Dec 21 '15 at 22:10
  • 4
    $\begingroup$ Checking all values under $10000$ yields the following four primitive triples, sorted in order of smallest element: $(108, 357, 368), (348, 975, 2380), (564, 748, 1425), (624, 4551, 6256)$. $\endgroup$ – Brian Tung Dec 21 '15 at 22:53
  • 1
    $\begingroup$ @Wojowu: One can also use elliptic curves to find new integer solutions. $\endgroup$ – Tito Piezas III Dec 22 '15 at 16:29

Using an elliptic curve, it can be shown that the system,

$$a^2+(b+c)^2 = x_1^2\\b^2+(a+c)^2 = x_2^2\\c^2+(a+b)^2 = x_3^2\tag1$$

has an infinite number of integer solutions with $\gcd(a,b,c)=1$.


Let $a = m^2-n^2,\;b=2mn-c$ and $(1)$ becomes,

$$(m^2+n^2)^2 = x_1^2\\2c^2+2c(m^2-2mn-n^2)+(m^2+n^2)^2 = x_2^2\\2c^2-2c(m^2+2mn-n^2)+(m^2+2mn-n^2)^2 = x_3^2\tag2$$

Thus, the problem is reduced to a pair of quadratic polynomials in $c$ that is to be made a square. If there is a rational point $c$, then the pair is birationally equivalent to an elliptic curve and in general there should be an infinite more rational points.

For example, using the smallest solution $a,b,c = 357,\, 108,\, 368$ we get $m,n = 2,\, 1$, hence,

$$2 c^2-2c+25 = x_2^2\\ 2 c^2-14c+49 = x_3^2\tag3$$

A solution, of course, is $c=\frac{3\times108}{357}$. Using the tangent method, another one is,

$$c = \frac{2859837252}{16433685001}$$

though there may be smaller ones. Clearing denominators, we get a new solution in positive integers to $(1)$ as,

$$a = 49301055003\\ b = 2859837252\\c= 62874902752$$

More directly,

$$a = 357(2-x^2)\\ b = 2(1+54x)(11-x)\\c = 2(31+8x)(15-23x)$$

and $x$ satisfies,

$$F(x):=2703220 - 3847384 x + 424640 x^2 + 1463524 x^3 + 537289 x^4 = y^2\tag4$$

Since $(4)$ has a known rational point, then it is birationally equivalent to an elliptic curve. The point $x = 7/13$ yields the smallest $a,b,c$ (after clearing denominators), while $x = 82711/6095$ gives the new one.

Not all $x$ will yield positive $a,b,c$. But since $F(x)=y^2$ has an infinite number of rational solutions, with some hand-waving we may assume there is a small infinite subset that yields $a,b,c$ that are all positive.


Here is a complete parametrization of all rational solutions to $\sqrt{a^2+(b+c)^2}\in\mathbb{Q}$, $\sqrt{b^2+(c+a)^2}\in\mathbb{Q}$, and $\sqrt{c^2+(a+b)^2}\in\mathbb{Q}$, where $a,b,c\in\mathbb{Q}$. If $p,q,r\in\mathbb{Q}_{\geq 0}$ be such that $$\frac{2p}{1+2p-p^2}+\frac{2q}{1+2q-q^2}+\frac{2r}{1+2r-r^2}=1\,,\tag{*}$$ then $(a,b,c)=\left(\frac{2p}{1+2p-p^2}x,\frac{2q}{1+2q-q^2}x,\frac{2r}{1+2r-r^2}x\right)$ for some $x\in\mathbb{Q}$ (namely, $x=a+b+c$). All rational solutions $(a,b,c)$ are of this form. There exists a positive integer solution $(a,b,c)$ associated to $(p,q,r)$ iff $0< p,q,r<1+\sqrt{2}$.

Frankly, I don't know if solving (*) is any easier than using the method mentioned by Tito Piezas III, but at least, there is one equation to be solved now, and with only $3$ rational variables. (However, if you try to write $p=\frac{m_1}{n_1}$, $q=\frac{m_2}{n_2}$, $r=\frac{m_3}{n_3}$, where $m_i,n_i\in\mathbb{Z}$ for $i=1,2,3$, then you will end up with $6$ variables, but the method mentioned by Tito Piezas III can reduce the number of variables to $5$.) There may be an algebraic-geometry/algebraic-number-theory method to solve (*), but I'm not so knowledgeable in these fields. Here is an example: $(a,b,c)=(108,357,368)$ is given by $(p,q,r,x)=\left(\frac{2}{27},\frac{1}{3},\frac{8}{23},833\right)$, where $\frac{2p}{1+2p-p^2}=\frac{108}{833}$, $\frac{2q}{1+2q-q^2}=\frac{3}{7}=\frac{357}{833}$, and $\frac{2r}{1+2r-r^2}=\frac{368}{833}$.

  • $\begingroup$ I simplified my answer and gave a new primitive solution $a,b,c$ in positive integers. $\endgroup$ – Tito Piezas III Dec 22 '15 at 16:27
  • $\begingroup$ @TitoPiezasIII Do you know how to solve equation (*) or, at least, find an infinite family of $(p,q,r)$ that satisfy (*)? $\endgroup$ – Batominovski Dec 22 '15 at 17:22
  • 1
    $\begingroup$ Well, yes, there is an infinite family, $$p,q,r = \frac{-1 + m}{1 + m}, \, \frac{m (1 + 3 m^2 - 4 m^3 + 3 m^4 + 4 m^5 + m^6)}{1 - 4 m + 3 m^2 + 4 m^3 + 3 m^4 + m^6}, \, \frac{(1 - m) (1 + m) (1 + m^2)^2}{2 m (1 - 2 m + 2 m^2 + 2 m^3 + m^4)}$$ May I know what you need it for? $\endgroup$ – Tito Piezas III Dec 24 '15 at 3:48
  • $\begingroup$ @TitoPiezasIII, I was hoping to get an infinite family of $(p,q,r)$ with $p,q,r>0$ in order to create a parametrized family $(a,b,c)$ of positive integers that satisfy the conditions. Triples in your parametrized family $(p,q,r)$ usually contain a negative entry, though. It is great, nonetheless, as it gives an infinite parametrized family of integer solutions $(a,b,c)$ to the required conditions. Would you please post how you obtained this family of triples? $\endgroup$ – Batominovski Dec 24 '15 at 9:38
  • $\begingroup$ This comment box is too small. Ask it as a separate question, and I'll share the algebraic trick. :) $\endgroup$ – Tito Piezas III Dec 24 '15 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.