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$.