1. ## Pythagorean triplet

2. Hello, MATNTRNG!

I have a very primitive solution . . .

Find the only Pythagorean triplet, $\displaystyle \{a, b, c\}$, for which $\displaystyle a + b + c \:=\: 1000$
All Pythagorean triples are generated by: .$\displaystyle \begin{Bmatrix}a &=& |m^2-n^2| \\ b &=& 2mn \\ c &=& m^2+n^2 \end{Bmatrix}\quad\text{for integers }\:m, n\,>\,0$

We have: .$\displaystyle a+b+c \;=\;(m^2-n^2) + (2mn) + (m^2+n^2) \;=\;1000$

. . which simplifies to: .$\displaystyle m(m+n) \:=\:500$

There are only seven solutions.

. . $\displaystyle \begin{array}{|c|c || c|c|c|} m & n & a & b & c \\ \hline 1 & 499 & 249,\!000 & 998 & 249,\!002 \\ 2 & 248 & 61,\!500 & 992 & 61,\!508 \\ 4 & 121 & 14,\!625 & 968 & 14,\!657 \\ 5 & 95 & 9000 & 950 & 9050 \\ 8 & 117 & 13,\!625 & 1872 & 13,\!753 \\ 10 & 40 & 1500 & 800 & 1700 \\ 20 & 5 & 375 & 200 & 425 \\ \hline \end{array}$

And only the last triplet $\displaystyle \{375,\:200,\:425\}$ has a sum of 1000.

3. Originally Posted by MATNTRNG
Find the only Pythagorean triplet, {a, b, c}, for which a + b + c = 1000.
$\displaystyle \begin{cases} a=m^2-n^2 \\ b=2mn \\ c=m^2+n^2 \end{cases}$

So $\displaystyle a+b+c = m^2-n^2+2mn+m^2+n^2 = 2m^2+2mn = 1000$

Therefore we want to solve $\displaystyle m^2+mn=500$

$\displaystyle 4m^2+4nm-2000 = 0$

Complete the square: $\displaystyle (2m+n)^2-2000-n^2 = 0$

Let $\displaystyle x=2m+n$ to get $\displaystyle n^2-x^2 = -2000$

Factor: $\displaystyle (n+x)(n-x) = -2^4\cdot5^3$

Now we just have finitely many cases to solve. For example solve $\displaystyle \begin{cases} n+x=4 \\ n-x=-500 \end{cases}$

I'll let you solve all of these out, but you should only get one solution with $\displaystyle m>n>0$, namely $\displaystyle (m,n) = (20,5)$

Now plug these into the formulas for $\displaystyle a,b,c$ to get $\displaystyle \begin{cases} a=375 \\ b=200 \\ c=425 \end{cases}$

4. The proof of a=m^2-n^2,b=2mn,c=m^2+n^2 assumed that (a,b)=1. Although it's easily seen that the formula still applies if (a,b) is a perfect square, but there's a potential that you'll miss some solution (although here it doesn't happen) if you merely consider a=m^2-n^2,b=2mn