All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 The smallest sum (Posted on 2012-06-02)
Find three distinct integers, X, Y and Z, such that X + Y, X + Z, Y + Z, X - Y, X - Z, and Y - Z are all squares of integers.
Apparently, there are many solutions.

Find the set [X, Y, Z] with the smallest X + Y + Z.

Comments: ( Back to comment list | You must be logged in to post comments.)
 thoughts | Comment 1 of 8

In order that all the squares be positive, x must be the largest and z the smallest. Y can't be negative and therefore X can't be negative.

The following program tests those numbers that meet these criteria for X up to 2000, and finds no solutions.

Either one of my assumptions is wrong or the solutions involve very large numbers.

DEFDBL A-Z
DECLARE FUNCTION isSq (x)
FOR x = 0 TO 2000
FOR y = 0 TO x - 1
FOR z = 1 - y TO y - 1
IF isSq(x + y) THEN
IF isSq(x - y) THEN
IF isSq(x + z) THEN
IF isSq(x - z) THEN
IF isSq(z + y) THEN
IF isSq(y - z) THEN
PRINT x, y, z
END IF
END IF
END IF
END IF
END IF
END IF
NEXT
NEXT
NEXT

FUNCTION isSq (x)
sr = INT(SQR(x) + .5)
IF sr * sr = x THEN isSq = 1: ELSE isSq = 0
END FUNCTION

 Posted by Charlie on 2012-06-02 13:08:08

 Search: Search body:
Forums (0)