# Are there integers a, b, c, d generating four right triangles with integer sides?

To make this more precise, we are looking for four (ETA: distinct) positive integers $a$, $b$, $c$, and $d$, such that $\sqrt{a^2+b^2}$, $\sqrt{b^2+c^2}$, $\sqrt{c^2+d^2}$, and $\sqrt{d^2+a^2}$ are all integers as well.

Equivalently, we seek a convex quadrilateral with integer sides, whose diagonals intersect at right angles at a point a (ETA: distinct) integer distance from all four vertices.

ETA: Answered in the affirmative below, by computer search. Is there a more elegant, less brute-forcey way to such an answer?

• I think you will get better results if you post a fresh question. Don't forget this time to say that the numbers should be distinct. – MJD Mar 19 '15 at 1:41
• Oh, thanks, I might. But I mostly got the response I wanted, thanks to you! – Brian Tung Mar 19 '15 at 17:38

Computer search finds many examples; considering only those where all four numbers are distinct, we have for example:

\begin{align} a & = 6375 \\ b& = 6512 \\ c & = 9984 \\d & = 800 \end{align}

and \begin{align} a & = 3472 \\ b& = 7296 \\ c & = 10400 \\d & = 2175 \end{align}

• Brilliant, thanks. (Sincerely.) I did run a search, but didn't extend it far enough. Also, I was curious whether there was better than a brute-force approach to the question. – Brian Tung Mar 18 '15 at 21:52
• My approach was a brute force search over all pythagorean triples. this is much faster than a search over all integers; It took a fraction of a second to run on my laptop. If you're interested I'll be glad to explain in more detail. – MJD Mar 18 '15 at 21:58
• No, I think I get the idea. I was lazy previously. But as you say, such a search, though not going through all quadruples, is still brute force. Nothing wrong particularly about that, but I was hoping for something with a bit more analytical flavor to it. Thanks for offering the answer so quickly! – Brian Tung Mar 18 '15 at 22:04
• @MJD: Would you mind sharing your code? – Tebbe Mar 19 '15 at 18:01
• @Tebbe github.com/mjdominus/perl-misc/blob/master/math/pt is the searcher, and github.com/mjdominus/perl-misc/blob/master/math/pttest is a checker that validates that the solutions printed by the first program are actually correct. – MJD Mar 19 '15 at 18:05

$$a=3, b=4, c=3, d=4...........$$

• I'm wondering if there exist pairwise coprime integers satisfying the question. – William Stagner Mar 18 '15 at 21:43
• I certainly didn't downvote it (and would not). I've edited the question to eliminate that kind of answer. – Brian Tung Mar 18 '15 at 21:54