A < B < C < D are four positive integers such that:
(i) B is the arithmetic mean of A and C and:
(ii) C is the
rms of B and D, and:
(iii) D-A = 50
Determine all possible quadruplets satisfying the given conditions and prove that there are no others.
For a = 1 To 1000000
d = a + 50
For c = a + 2 To a + 48 Step 2
b = (a + c) / 2
rmssq = (b * b + d * d) / 2
If rmssq = c * c Then
Text1.Text = Text1.Text & a & Str(b) & Str(c) & Str(d) & crlf
DoEvents
End If
Next c
Next a
finds only
29 47 65 79 as the values of a, b, c and d respectively.
|
Posted by Charlie
on 2014-11-04 20:32:00 |