(In reply to
Some, maybe all by Jer)
Checking for all x and y whose sum is under 46000, assures there are no sporadic cases among those. (The total was set to go higher, but met overflow around 46,000).
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For tot = 2 To 100000
For x = 1 To tot / 2
y = tot - x
If Abs(x - y) <> 1 Then
sm = tot + 1: prd = 2 * x * y
If prd Mod sm = 0 Then
df = tot - 1: sq = x * x + y * y - 1
If sq Mod df = 0 Then
Text1.Text = Text1.Text & x & Str(y) & crlf
DoEvents
End If
End If
End If
Next
Next
Text1.Text = Text1.Text & mxn & crlf & " done"
End Sub
|
Posted by Charlie
on 2015-06-16 12:08:54 |