DefDbl AZ
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For a = 1 To 9
For b = 0 To a  1
ab = 10 * a + b
ba = 10 * b + a
sq = ab * ab  ba * ba
sr = Int(Sqr(sq) + 0.5)
If sr * sr = sq Then
Text1.Text = Text1.Text & ab & Str(ba) & " " & sq & Str(sr) & crlf
End If
DoEvents
Next
Next
Text1.Text = Text1.Text & crlf & " done"
End Sub
finds
65 56 1089 33
giving the answer as PQ has length 65. The chord RS has length 56 and the length of OT is 33/2.
This is the result of segment OR (or OS) being a radius of the circle (half the length of PQ) and the hypotenuse of a right triangle with legs being to TO and half the length of RS. The halvings require the halving of the 33 result.
The important consideration is that in working with the Pythagorean result sqrt(ab^2/4  ba^2/4) (the ab and ba being concatenations, not multiplications), the difference of the numerators is an integer which must be a square as no multiplication by a square will turn a nonsquare into a square or the square of a rational.

Posted by Charlie
on 20160711 15:31:47 