Generating Pythagorean Triples From One Leg The question is simple: Find the longest possible hypotenuse in a right triangle with integer sides where the shortest side has length T. What I am asking is if there are any means to approach this besides testing pythagorean triples by brute force.

To find Pythagorean triples with a given side B, we begin with the function:
$$n=\frac{B}{2m}\text{ trying values of }m\text{ from }\biggl\lceil\sqrt{\frac{B}{2}}\space\space\biggr\rceil\text{ to }\frac{B}{2}\text{ for integer values of }n.$$
For example triples with side $B=20$.
$$m=\biggl\lceil\sqrt{\frac{B}{2}}\space\space\biggr\rceil=4\text{ to }\frac{B}{2}=10$$ In the search we find $f(5,2)=(21,20,29)\text{ and }f(10,1)=(99,20,101).$
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}$$
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 $(m,n)=(11,4), (13,8), (19,16),\text{ and }(53,52).$ For these respective values of $(m,n)$ we have:
$$A,B,C=105,38,137\quad A,D,E=105,208,233\quad A,F,G=105,608,617\quad A,H,I=105,5512,5513$$
These formulas find matching sides (if they exist) in a [small] finite search. When you find the largest opposite a given side A or B, that will be the one with the longest hypotenuse.
