Find natural numbers a < b < c such that:
a^2 + b^2 = c^2a + b + c = 1000Compute abc.
I started by looking at small Pythagorean triples and noticed I could rewrite the product in the form abc = (a+b+c)cx.
That turns the problem into a one-parameter search instead of a 3-variable search.
From the setup:
ab = 1000xc = 500 - xa + b = 500 + xSo a and b must be roots of:
t^2 - (500 + x)t + 1000x = 0
For integer roots, the discriminant must be a perfect square.
The valid value is x = 75.
So:
c = 425a + b = 575ab = 75000which gives:
a = 200b = 375Hence:
(a,b,c) = (200,375,425)
and
abc = 31875000
The main missing idea was using Vieta’s formulas plus the discriminant condition:
If two integers have sum M and product N, then they are roots of
t^2 - Mt + N = 0.
So integer-root constraints can finish a problem after algebraic reduction.
```python for x in range(1, 500): s = 500 + x p = 1000 * x D = ss - 4p r = int(D*0.5) if rr == D: a = (s - r) // 2 b = (s + r) // 2 c = 500 - x if a > 0 and b > 0 and a < b < c: print(x, a, b, c, abc) break