# Diophantine Problems

• March 19th 2012, 01:26 AM
johnsy123
Diophantine Problems
I am having troubles with the following questions.

1) Find three numbers such their sum is a square and the sum of any pair is a square?
I set up 4 equations but couldn't solve them....
-a+b+c=d^2
-a+c=f^2
-a+b=e^2
-b+c=h^2

• March 19th 2012, 01:47 AM
princeps
Re: Diophantine Problems
Quote:

Originally Posted by johnsy123
I am having troubles with the following questions.

1) Find three numbers such their sum is a square and the sum of any pair is a square?
I set up 4 equations but couldn't solve them....
-a+b+c=d^2
-a+c=f^2
-a+b=e^2
-b+c=h^2

Let :

$\begin{cases}x+y+z=a^2 \\x+y=b^2 \\x+z=c^2 \\y+z=d^2\end{cases}$

then :

$2a^2=b^2+c^2+d^2$

There is an infinite number of triples (x,y,z) which represents solution .

This Maple program calculates triples (x,y,z)

Code:

for a from 0 to 20 do for b from 0 to 20 do for c from 0 to 20 do for d from 0 to 20 do if 2*a^2=b^2+c^2+d^2 then print(solve({x+y=b^2, x+z = c^2, y+z=d^2}, [x, y, z])); end if; end do; end do; end do; end do;
• March 19th 2012, 08:26 AM
Wilmer
Re: Diophantine Problems
(17,32,32) seems to be the only primitive solution with integers > 0.

Princeps, I'd code like this (eliminate loop, no duplicates):
for b from 0 to 20 do
for c from b to 20 do
for d from c to 20 do
a = SQRT(b^2 + c^2 + d^2) / 2
(skip if a not integer)