The maximum life span of a given inhabitant of the planet Realmblanc is 950 years (by Earth standards.)
The following relationships hold among the ages of the members of a family of four in Realmblanc. Each of the ages (in Earth years) is a positive integer.
(a) The mother is three times as old as the daughter was when the father was the same age as the mother is now.
(b) When the daughter reaches half the age the mother is now, the son will be half as old as the father was when the mother was twice the age the daughter is now.
(c) When the father reaches twice the age the mother was when the daughter was the same age as the son is now, the daughter will be four times as old as the son is now.
(d) The sum of the ages of the son and the mother (in Earth years) is divisible by 7.
Given that precisely one of their ages (in Earth years) is a perfect square, what are the four ages?
a) M = 3(D  (F  M))
b) involves a time M/2  D years in the future, and refers to a time M  2D years in the past:
S + M/2  D = (F  (M  2D))/2
c) D  S years ago the mother was M  (D  S) years old, and the father will be twice that age in 2(M  (D  S))  F years:
D + 2(M  (D  S))  F = 4S
So:
3F  2M  3D = 0
F + 2M  4D + 2S = 0
F + 2M  D  2S = 0
2F  7D + 2S = 0
2F + 4M  5D = 0
 3D + 4S = 0
3D = 4S
4F = 11D
8M = 21D
So D must be a multiple of 8.
CLS
FOR d = 8 TO 950 STEP 8
s = 3 * d / 4
f = 11 * d / 4
m = 21 * d / 8
IF (s + m) MOD 7 = 0 AND f <= 950 THEN
good = 0
sr = INT(SQR(f) + .5)
IF sr * sr = f THEN good = 1
sr = INT(SQR(m) + .5)
IF sr * sr = m THEN good = 2
sr = INT(SQR(d) + .5)
IF sr * sr = d THEN good = 3
sr = INT(SQR(s) + .5)
IF sr * sr = s THEN good = 4
IF good THEN PRINT f; m; d; s, good
END IF
NEXT
finds
F M D S
462 441 168 126 2
where the Mother's age, 441, is 21 squared.

Posted by Charlie
on 20091203 12:44:40 