number sq root two sq roots
49 7 2 3
1681 41 4 9
225625 475 15 25
2528178961 50281 159 281
3132976729 55973 177 277
8122515625 90125 285 125
There are no more through 14-digit numbers, through which the program checked.
For n = 1 To 10000000
n2$ = LTrim(Str(n * n))
l = Len(n2)
If l Mod 2 = 0 And InStr(n2, "0") = 0 Then
l2 = l / 2
sq1 = Val(Left(n2, l2))
sq2 = Val(Mid(n2, l2 + 1))
sr1 = Int(Sqr(sq1) + 0.5)
If sr1 * sr1 = sq1 Then
sr2 = Int(Sqr(sq2) + 0.5)
If sr2 * sr2 = sq2 Then
Text1.Text = Text1.Text & n2 & Str(n) & " " & sr1 & Str(sr2) & crlf
End If
End If
End If
DoEvents
Next
|
Posted by Charlie
on 2018-12-05 10:28:31 |