Solve Euler Project #9 only mathematically - Pythagorean triplet The "Euler Project" problem 9 (https://projecteuler.net/problem=9) asks to solve:
$a^2$ + $b^2$ = $c^2$
a + b + c = 1000
I find answers solving it with brute-force and programmatically, but is there a way to solve the problem ONLY mathematically? Can someone help, please?
Problem as explained in Project Euler website:

A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,

a^2 + b^2 = c^2
For example, 3^2 + 4^2 = 9 + 16 = 25 = 52.

There exists exactly one Pythagorean triplet for which a + b + c = 1000.

Find the product abc.


Hint Euclid's parameterization of the Pythagorean triples (Elements, Book X, Proposition XXIX) is:
$$a = k (m^2 - n^2), \qquad b = 2 k m n, \qquad c = k (m^2 + n^2),$$
where $m > n > 0$ and $m, n$ coprime and not both odd.
Substituting in our condition gives
$$1000 = a + b + c = 2 k m (m + n),$$ and clearing the constant leaves $$\phantom{(\ast)} \qquad 500 = k m (m + n) . \qquad (\ast)$$
Now, notice that (1) $500 = 2^2 5^3$ has only two distinct prime factors, and (2) since $m$ and $n$ are coprime, so are $m$ and $m + n$.

So, one of $m, m + n$ must be one of $1, 2, 4$ (in fact one of $2, 4$, since $m > n > 0$ implies $m + n > m > 1$) and the other must be one of $1, 5, 25, 125$. Because $m + n > m$, we must have $m \in \{2, 4\}$, and so $m + n < 2 m \leq 8$. Thus, $m + n = 5$, and $2 m > m + n = 5$ implies $m \geq 3$, leaving $m = 4$ as the only possibility. So, $n = 1, k = 25$, and $$\color{#df0000}{\boxed{(a, b, c) = (375, 200, 425)}} .$$

