Pythagorean Triplets with sum less than $1500000$

250 Views Asked by At

Consider any Pythagorean Triplet $(\sqrt{a*b}, \frac {a-b} {2}, \frac {a+b}{2})$. For generality, consider $a>b>0$.
Now we are given than sum of sides is less than $L=1500000$
$$\implies \sqrt{a*b}+a\le L$$ $$\implies \sqrt{a*b} \le L-a$$
Since $L.H.S$ and $R.H.S$ are positive, squaring them gives:
$$\implies a*b \le a^2 -2La +L^2$$ $$\implies a^2 -(2L+b)a +L^2 \ge 0$$ Using basics of Quadratic Equations, the above equation has minimum value of $(\frac{4L^2-(2L+b)^2}{4})$ at $a = \frac{2L+b}{2}$.
$$\therefore \frac{4L^2-(2L+b)^2}{4} \ge 0$$ $$\implies {4L^2-(2L+b)^2} \ge 0$$ $$\implies (2L+b)^2 \le (2L)^2$$ $$\implies -4L \le b \le 0$$
This is surely not a correct result. What have I done wrong here?

2

There are 2 best solutions below

2
On

I can’t see how that formula will give a Pythagorean Triplet, so perhaps you could start with $$2kab,k(a^2-b^2),k(a^2+b^2)$$ where $gcd(a,b)=1$ and $a,b$ are of opposite parity. Then $$L=k(2a^2+2ab)$$

Minimum $L=12$ is given by $(k,a,b)=(1,2,1)$

Maximum $L= 1499996$ is given by $(k,a,b)=(193,58,9),(29,134,59)$

Addition 23 Sept 2016.

You asked where you went wrong, and it’s with the formula for a Pythagorean Triplet. Substitute some small values for $a,b$ to see that, unless $ab$ is square, you contravene the very definition of a Pythagorean Triplet; a right-angled triangle with integer sides. IMHO, it’s wasted effort to look further errors.

Although there are three parameters, for the maximum it’s sufficient to calculate just for $k=1$, then recalculate $k$ as $1500000/L$ where $/$ is used here as integer division.

0
On

You have an inequality, you are looking for positive solutions. You found that if you add one condition (that for a fixed $b$, $a$ is chosen so that a certain function is minimized), you get an absurd result. All this means is that your added condition is absurd. There are of course plenty of non-absurd Pythagorean triples, just that they don't satisfy $a = (2L + b)/2$.

To make things more clear:

if you suppose $a = (2L + b)/2 = L + b/2$, then assuming $b > 0$ you already have $$ \sqrt{ab} + \frac{a-b}{2} + \frac{a+b}{2} > a > L $$ which means that your postulate $a = (2L + b)/2$ already violates your length constraint that you started with. So by the principle of "garbage in, garbage out", of course you get a seemingly ridiculous bound.