Given
a^2+15226=c^2,
How many solutions (a,c) are there such that both numbers are positive integers?
Please comment upon the unexpected result.
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr(13) & Chr(10)
For a = 1 To 9999
preva2 = a2
a2 = a * a: c2 = a2 + 15226
If a2 - preva2 > 16000 Then Text1.Text = Text1.Text & "***" & crlf: Exit For
sr = Int(Sqr(c2) + 0.5)
If sr * sr = c2 Then
Text1.Text = Text1.Text & a & Str(c) & " " & a2 & Str(c2) & crlf
ct = ct + 1
End If
Next a
Text1.Text = Text1.Text & crlf & ct & " done"
End Sub
finds no solutions.
|
Posted by Charlie
on 2018-02-24 14:05:52 |