The first is 42 and the other two are 11 and 13.
The program showed the "first" last:
11 13 42
from
For a = 1 To 48
For b = a + 1 To 49
If gcd(a, b) = 1 Then
For c = b + 1 To 50
If gcd(a, c) = 1 And gcd(b, c) = 1 Then
If c * c = (a * a * a + b * b * b) / 2 Then Text1.Text = Text1.Text & a & Str(b) & Str(c) & crlf
End If
DoEvents
Next
End If
Next
Next
with
Function gcd(a, b)
x = a: y = b
Do
q = Int(x / y)
z = x - q * y
x = y: y = z
Loop Until z = 0
gcd = x
End Function
|
Posted by Charlie
on 2019-02-04 11:55:20 |