# Pythagorean Triple: $\text{Area} = 2 \cdot \text{perimeter}$

Find the unique primitive Pythagorean triple whose area is equal to twice the perimeter.

So far I set the sides of the triangle to be $$a, b,~\text{and}~c$$ where $$a$$ and $$b$$ are the legs of the triangle and c is the hypotenuse.

I came up with 2 equations which are:

$$\dfrac{ab}2 = 2(a+b+c)\;\;$$ and $$\;\;a^2+b^2=c^2$$

but I'm not sure how to proceed and solve for $$a, b, c$$.

• A primitive Pythagorean triplet is of the form $\left(2m n,m^2-n^2,m^2+n^2\right)$. Therefore we need to solve $m n\left(m^2-n^2\right)=4m(m+n)$ – Lozenges Aug 3 '17 at 18:20

Rewrite the first equation as $c = \frac{ab}{4} - a - b$. Square it to get $$c^2 = a^2 + b^2 + \frac{a^2b^2}{16} - \frac{a^2b}{2} - \frac{ab^2}{2} + 2ab$$ Now using the other equation, we see that $$\frac{a^2b^2}{16} - \frac{a^2b}{2} - \frac{ab^2}{2} + 2ab = 0$$ Since $a,b > 0$ divide by $ab$ and multiply by $16$ to get $$ab - 8a - 8b + 32 = 0$$ Use Simon's Favorite Factoring Trick to get $(a-8)(b-8) = 32$.

Now note that $a$ and $b$ are integers, so $(a-8)$ and $(b-8)$ must be factors of $32$. But factoring $32$ into anything except for $\{1,32\}$ gives you two even numbers - these can't be the legs of a primitive Pythagorean triple. Thus, we must have $a=9,b=40$, giving us the $(9,40,41)$ triangle.

Hint: isolate for c in both equations:

$c=\frac{ab}4 - a - b$ and $c = \sqrt{a^2+b^2}$. Now isolate for a or b and then substitute back into your equations.

Hint: formula for primitive triples is

$a = mn; b = \frac {m^2 -n^2}2; c = \frac {m^2 + n^2}2$ for $\gcd(m,n) = 1$. And as $m^2 - n^2$ is even $m$ and $n$ must both be odd.

So we want $\frac {mn(m^2 -n^2)}4 = 2(mn + \frac {m^2 - n^2}2 + \frac {m^2 - n^2} 2) = 2(mn + m^2)$

So $mn(m-n)(m+n) = 8m(m+n)$

So $n(m-n)=8$

For $n=1,2,4,8$ we have $m = 9,6,6,9$. Only $n =1; m= 9$ have $\gcd(m,n) =1$ and $m^2 -n^2$ is even.

So solutions are $a = 9; b = 40; c=41$

====earlier answer with and an easier but not exhaustive formula for a triple ====

==== it worked out nicely, but it doesn't rule out that there aren't any others; nor did it guarentee I'd find a solution ===

Hint: Formula for primitive triples is $k, \frac {k^2 - 1}2, \frac {k^2+1}2$ where $k$ is odd. Ex. $3,4,5; 5,12,13; 7,24,25$ etc.

So we need to solve $\frac {ab}2 = \frac {k (k^2 -1)}4 = 2(a+b+c) = 2(k + \frac {k^2 - 1}2 + \frac {k^2 + 1}2) = 2(k + k^2)$.

Has a very nice solution!.

We can find Pythagorean triples, if they exist, for any ratio $$R$$ of area/perimeter by finding the $$m,n$$(s) that represent them using the following formula which includes a difined finite search for values of $$m$$. Whenever the $$m$$ $$R$$ combination yields a positive integer for $$n$$, we have the $$m,n$$ for a triple. We begin by solving the area/perimeter equation for $$n$$ where area=$$D$$ so as not to confuse it with $$A,B,C$$.

$$D=\frac{AB}{2}=\frac{(m^2-n^2)*2mn}{2}=mn(m^2-n^2)\quad P=(m^2-n^2)+2mn+(m^2+n^2)=2m^2+2mn$$

$$\frac{D}{P}=\frac{mn(m^2-n^2)}{2m^2+2mn}=\frac{mn(m-n)(m+n)}{2m(m+n)}=\frac{n(m-n)}{2}=R\qquad n^2-mn+2R=0$$

$$n=\frac{-b\pm\sqrt{b^2-4ac}}{2a}=\frac{m\pm\sqrt{m^2-4*1*2R}}{2*1}$$

$$\mathbf{n=\frac{m\pm \sqrt{m^2-8R}}{2}\text{ where }\lceil\sqrt{8R}\space \rceil \le m \le 2R+1}$$

Having found $$m,n\qquad A=m^2-n^2\qquad B=2mn\qquad C=m^2+n^2$$

Examples:

$$R=\frac{1}{2}\implies 2\le m \le 2\rightarrow n=1\rightarrow f(2,1)=(3,4,5)$$ You need to choose positive integer values of $$n$$ for all others. They usually occur in pairs and you need to choose which are primitive. I'm using $$m+$$ and $$m-$$ to indicate which came from the $$+$$ or $$-$$ of the radical.

$$R=1\implies 2\le m \le 3\quad m=2\rightarrow n \notin\mathbb{N}\quad m+\rightarrow f(3,2)=(5,12,13)\quad m-\rightarrow f(3,1)=(6,8,10)$$

Now, for your question, there is only one primitive triple where area/perimeter=$$2$$. Two others are multiples of triples $$R=2\implies 4\le m \le 5\quad \text{for }m=4\rightarrow m+=m-\rightarrow f(4,2)=(12,16,20)\qquad \text{for }m=5\rightarrow m+\rightarrow f(5,4)=(9,40,41)\quad m-\rightarrow f(5,1)=(24,10,26)$$

Going farther

$$R=3\rightarrow 4\le m\le 7:\quad f(5,3)=(16,30,34)\quad f(5,2)=(21,20,29)\qquad \qquad \qquad f(7,6)=(13,84,85)\quad f(7,1)=(48,14,50)$$ If you need just one primitive for a given ratio: use $$(m,n)=(2R+1,2R)$$.