So is it possible for:







  • 2
    $\begingroup$ I thought it was common knowledge that $$3^2+4^2=5^2\qquad\text{and}\qquad5^2+12^2=13^2.$$ $\endgroup$
    – Servaes
    Aug 15, 2018 at 16:35
  • $\begingroup$ Lol i forgot about that haha $\endgroup$
    – Dean Yang
    Aug 15, 2018 at 17:07

3 Answers 3


Any primitive Pythagorean triple can be expressed as $m^2-n^2, 2mn, m^2+n^2$ where $\gcd{m,n}=1$ and $m \not\equiv n \mod{2}$. For $m=ab, n=cd$ we can create two new quantities, $r=ac, s=bd$ such that $2mn=2rs$ and a primitive Pythagorean triple of the form $r^2-s^2, 2rs, r^2+s^2$ can be obtained which shares a common "leg" with the first triple.

Addendum: Due to the lateness of the hour, I only provided a partial answer given above to show that it was possible to answer the question in the affirmative. I glossed over a few items. Plainly $m>n$. But we must choose $(r,s)$ such that $r>s$. Accordingly, when we form $ac$ and $bd$, we must set $r$ equal to the larger of them. It will be noticed in passing that because one of $(m,n)$ and $(r,s)$ is even, that the even member of a primitive Pythagorean triple is divisible by $4$. Finally, I only demonstrated that in at least some cases, the even member of one primitive Pythagorean triple could appear in another. But not every even number can satisfy this condition. In particular, if $2mn=2^k$, then the only way to write factors that satisfy the general requirements is $m=2^{k-1},n=1$.

It is also usually the case that the odd member of one primitive Pythagorean triple can appear in another. One way to approach this is to factor $m^2-n^2$ into the odd factors $(m+n)(m-n)$ and examine those factors. But it is easier to employ the reasoning already presented to another formulation of primitive Pythagorean triples. $\frac{(m^2-n^2)}{2},mn,\frac{m^2+n^2}{2}$ is another formula that generates Pythagorean triples that are primitive when $\gcd{m,n}=1$ and $m \equiv n \equiv n \equiv 1 \mod{2}$. In this case, $mn$ is the smaller odd member of triple. As before, for $m=ab, n=cd$ we can create two new quantities, $r=ac, s=bd$ such that $mn=rs$ and a new primitive Pythagorean triple is obtained, with similar restrictions as apply in the former case. This shows that the smaller odd member of a Pythagorean triple in many instances can appear in more than one such triple. Note that if $mn=p^k$ then that particular odd number can only appear in a unique triple, analogous to the case of $2mn=2^k$ referred to above.

  • 1
    $\begingroup$ Thanks for catching my omission; I have edited the answer to reflect that. $\endgroup$ Aug 13, 2018 at 1:53
  • 1
    $\begingroup$ No problem! Another hint: try \pmod instead of \mod. :) $\endgroup$
    – Théophile
    Aug 13, 2018 at 1:53
  • $\begingroup$ Example: (m,n)=(6,7) and (m',n')=(2,21) with Pyth. triples (84,13,85) and (84,437,445). $\endgroup$ Aug 13, 2018 at 18:10

We can find different triples with the same odd legs, if they exist, using this function of $(m,A)$: $$\text{We can let }n=\sqrt{m^2-A}\text{ where m varies from }\lceil\sqrt{A}\space\rceil\text{ to }\frac{A+1}{2}$$ There is always a Pythagorean triple with side $A=(2m-1),m\in\mathbb{N}\land m\ge2$ and sometimes more than one with the same side length. The smallest of these where $A^2+B^2=C^2\land A^2+D^2=E^2$ is $A=15$ such as in $(15,8,17)$.

$$m_{min}=\lceil\sqrt{15}\space\rceil=\lceil 3.872983346\rceil=4\text{ and }m_{max}=\frac{A+1}{2}=\frac{16}{2}=8$$

Testing for $m=4\text{ to }8$, we find integers when $(m,n)=(4,1)\text{ and }(8,7)$

$$\text{For }(4,1)\quad A=4^2-1^1=15\quad B=2*4*1=8\quad C=4^2+1^2=17$$

$$\text{For }(8,7)\quad A=8^2-7^2=15\quad D=2*8*7=112\quad E=8^2+7^2=113$$ Sometimes there is only one match such as the smallest $(3,4,5)$ where $m_{min}=m_{max}=2.$ At other times, there are many matches such as for $A=105$ where $m_{min}=11$ and $m_{max}=53.$ and we find $(11,4), (13,8), (19,16),\text{ and }(53,52).$ For these respective values of $(m,n)$ we have:

$$A,B,C=105,88,137\quad D,E=208,233\quad F,G=608,617\quad H,I=5512,5513$$


This system of equations:


Solutions have the form:






$t,k,p,s$ - integers asked us.


Not the answer you're looking for? Browse other questions tagged .