Saturday, 14 November 2015

How to calculate the total number of possible right angle triangles where the perimeter is given, and all sides are integers?



I have been trying to find a formula to find the number of right angled triangles where all the sides are integers and the perimeter is given. I have seen the formula x3/((1-x2)(1-x3)(1-x4)), but that gives me the amount of possible triangles with that perimeter, not the amount of right - angled triangles. Does anyone know any formulas to find the amount of right angled, integer triangles of a given perimeter? Thanks in advance!


Answer



To ensure the sides are integers, we use the famous parametrization:

$$a=m^2-n^2$$
$$b=2mn$$
$$c=m^2+n^2$$



Then we have: ($p$ is perimeter)
$$p=a+b+c=2m^2+2mn=2m(m+n)$$



When $p$ is odd, no integer solutions for $m, n$ exist.



When $p=2ab$, the number of solutions is the number of $b$ such that $a


For even $p \le 10$, there is no solution.



The first solution occurs at $p=12$, we have $m=2, n=1$, and $(a,b,c)=(3,4,5)$.



EDIT: I realized that a solution rarely exists. If you want to find some $p$ such that a solution exists, I suggest you substitute arbitrary values of $m,n$ into the formula $p=2m(m+n)$.


No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...