Because we are looking for , and we can determine a starting point for . If then the max value for and , which is less than .
Using the Requirements
We are still checking a bunch of numbers that can’t be an answer.
, so , and . That means we only need to check one value of per value of . We still need to check every value of less than , that is until , further reducing the values we have to check.
Euclid’s formula
For a pythagorean triplet,
$$a = m^2 - n^2 ,\ \, b = 2mn ,\ \, c = m^2 + n^2\; \text{where}\; m > n$$
and because our problem requires $a+b+c=1000$,
$$\begin{align*}
m^2 -n^2 + 2mn + m^2 + n^2 & = 1000 \\
2m^2 + 2mn & = 1000 \\
2m(m+n) & = 1000 \\
m(m+n) & = 500 \\
n & = (500 \div m) - m
\end{align*}$$