0
$\begingroup$

Possible Duplicate:
Pythagorean Triplets with “Bounds”

I typed following equations in into Wolfram Alpha -

$a^2 + b^2 = c^2\\ a+b+c=1000 $

It showed me multiple possible integer solutions and also shows the total number of integer solutions.

How is this done? Could I calculate total number of solutions without actually solving for all those solutions?

  • 1
    Just found : http://math.stackexchange.com/questions/179997/pythagorean-triplets-with-bounds2012-12-19

1 Answers 1

4

Using Euclid's formula for generating Pythagorean triples, we can take $a,b,c$ to be $p^2-q^2,p^2+q^2,2pq$ where $p,q,r$ are integers.

So, $p^2-q^2+p^2+q^2+2pq=1000\implies p(p+q)=500$

So $p+q=\frac{500}p$ which must be some integer.

If $p=1,p+q=500\implies q=499$ and so on