1. If all x, y and z were even the sum would be a multiple of 4, which 2010 is not. If one were odd and the others even, or all were odd, the sum would be odd, which 2010 is not. So two are odd and one is even.
2.
CLS
DEFDBL A-Z
FOR x = 0 TO 45
x2 = x * x
FOR y = x TO 45
y2 = y * y
FOR z = y TO 45
z2 = z * z
IF x2 + y2 + z2 = 2010 THEN PRINT x, y, z
NEXT
NEXT
NEXT
finds
x y z
1 28 35
4 25 37
5 7 44
5 31 32
7 19 40
11 17 40
16 23 35
19 25 32
These are the 8 non-trivial variations.
Each of these can be permuted 6 ways, producing 48 positive integral solutions.
Each of x, y and z can, independently, be made positive or negative, multiplying the solutions by 2^3 = 8, making the final number of integer solutions 8*6*8 = 384.
|
Posted by Charlie
on 2010-11-04 18:44:03 |