# How to find Pythagorean triples with one side only?

I was using the formula to find triples, but I can only find two of them.

the pythagorean triple associate with 102 are 102 136 170, 102 280 298, 102 864 870, 102 2600 2602,

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

let $$a = 102 = (m+n)(m-n)$$

since m and n are odds

(m+n)(m-n) would be a multiply of 4, but 102 isn't a multiply of 4

There are no solution when a = 102

let b = 102, mn = 51

case 1 : m= 51, n=1 we get 102 2600 2602

case 2 : m= 17, n=3 we get 102 280 298

This is a common mistake. It's not the case that the formula you give finds all Pythagorean triples. Rather, the formula finds all primitive Pythagorean triples—triples whose greatest common divisor equals $$1$$. Furthermore, in that formula the $$m$$ and the $$n$$ should have opposite parity and be relatively prime.

Since $$(m,n)=(51,1)$$ and $$(m,n)=(17,3)$$ are the only relevant factorizations of $$\frac{102}2$$, and neither of them has integers with opposite parities, we conclude that there are no primitive Pythagorean triples at all with $$102$$ as a leg.

But we can also look for primitive Pythagorean triples with a leg that is a divisor of $$102$$, and scale it up appropriately. The divisors of $$102$$ are $$1,2,3,6,17,34,51,102$$, and doing this process on each of these divisors individually yields four primitive Pythagorean triples: $$(3,4,5), \quad (17,144,145),\quad (51,140,149), \quad (51,1300,1301).$$ Multiplying these through by $$34,6,2,2$$ respectively gives the four triples listed in your answer.

The fact that the formula for primitive triples, when the primitivity is ignored, sometimes does produce some Pythagorean triples makes this mistake even easier to make. The moral of the story: we need to appreciate the exact wording of a theorem—including all its hypotheses and its precise conclusion.

Forgive me for taking the liberty of altering Euclid's formula, normally expressed as $$F(m,n)$$, here expressed as $$F(n,k)$$. The following is copied from a paper I am writing on the subject and the $$k$$ matches up with an alternative formula I have developed. Given

$$A=m^2-k^2\qquad B=2mk\qquad C=m^2+k^2$$ We can find triples, if they exist, with a finite search by solving Euclid's formula function for $$k$$ and seeing which $$m$$-values within the limits yield integers. In the following discussion, we first find limits solving for $$m$$ with $$k$$ varying from $$1$$-to-$$(m-1)$$.

side A $$A=m^2-1\implies \lfloor\sqrt{A+1}\rfloor\le m \qquad\qquad A=m^2-(m-1)^2=2m-1\implies m \le\frac{A+1}{2}$$ $$B=2m(m-1)=2m^2-2m\implies\bigg\lfloor \frac{1+\sqrt{2B+1}}{2}\bigg\rfloor\le m \qquad\qquad B=2m(1)\implies m\le \frac{B}{2}$$ $$C=m^2+(m-1)^2=2m^2-2m+1 \implies\bigg\lfloor\frac{ 1+\sqrt{2C-1}}{2}\bigg\rfloor \le m \quad C=m^2+1\implies m\le \lfloor\sqrt{C-1}\rfloor$$ I have provided examples so you can see how it works. $$A$$ is always odd (without a multiplier) so I have used $$A\in\{3,17,51\}$$ in the calculations. Also, a primitive $$C$$ must be of the form $$(4n+1)$$ so have use $$C=17$$. You need to multiply the $$A$$ and $$C$$ results accordingly.

$$A=m^2-k^2\implies k=\sqrt{m^2-A}\qquad\text{where}\qquad \sqrt{A+1} \le m \le \frac{A+1}{2}$$ The lower limit ensures $$k\in\mathbb{N}$$ and the upper limit ensures $$m> k$$. $$A=3\implies \lfloor\sqrt{3+1}\rfloor=2\le m \le \frac{3+1}{2} =2\quad\text{ and we find} \quad m\in\{2\}\implies k \in\{1\}$$ $$f(2,1)=(3,4,5)\qquad$$

$$A=17\implies \lfloor\sqrt{17+1}\rfloor=4\le m \le \frac{17+1}{2} =9\quad\text{ and we find} \quad m\in\{9\}\implies k \in\{8\}$$ $$f(9,8)=(17,144,145)\qquad$$

$$A=51\implies \lfloor\sqrt{51+1}\rfloor=7\le m \le \frac{51+1}{2} =26\quad\text{ and we find} \quad m\in\{10,26\}\implies k \in\{7,25\}$$ $$fF(10,7)=(51,140,149)\qquad \qquad (26,25)=(51,1300,1301)\qquad \qquad$$ $$\\$$

$$B=2mn\implies k=\frac{B}{2m}\qquad\text{where}\qquad \bigg\lfloor \frac{1+\sqrt{2B+1}}{2}\bigg\rfloor \le m \le \frac{B}{2}$$ The lower limit ensures $$m>k$$ and the upper limit ensures $$m\ge 2$$.

$$B=102\implies\qquad \bigg\lfloor \frac{1+\sqrt{204+1}}{2}\bigg\rfloor =7 \le m \le \frac{102}{2}=51\quad \text{and we find} \quad m\in\{17,51\}\implies k\in\{3,1\}$$ $$F(17,3)=(280,102,298)\qquad \qquad f(51,1)=(2600,102,2602)$$ $$\\$$

$$C=m^2+k^2\implies n=\sqrt{C-m^2}\qquad\text{where}\qquad \bigg\lfloor\frac{ 1+\sqrt{2C-1}}{2}\bigg\rfloor \le m \le \lfloor\sqrt{C-1}\rfloor$$ The lower limit ensures $$m>k$$ and the upper limit ensures $$k\in\mathbb{N}$$. $$C=17\implies \bigg\lfloor\frac{ 1+\sqrt{17-1}}{2}\bigg\rfloor=2 \le m < \lfloor\sqrt{17-1}\rfloor=4\quad\text{ and we find} \quad m\in\{4\}\Rightarrow k\in\{=1\}$$ $$F(4,1)=(15,8,17)\quad$$