The pair of positive integers (4,6) satisfies the equation
(2x+1)*x=y^2
Find at least three additional pairs, both x and y below 10^6.
x y y^2
4 6 36
144 204 41616
4900 6930 48024900
166464 235416 55420693056
5654884 7997214 63955431761796
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For x = 1 To 20000000
lhs = (2 * x + 1) * x
y = Int(Sqr(lhs) + 0.5)
If lhs = y * y Then
Text1.Text = Text1.Text & x & Str(y) & " " & y * y & crlf
End If
DoEvents
Next
Text1.Text = Text1.Text & crlf & " done"
End Sub
|
Posted by Charlie
on 2016-08-08 22:12:14 |