55, 60, 110, 120, 165 from the following table:
X Y AM GM HM 2X+Y
5 45 25 15 9 55
10 40 25 20 16 60
10 90 50 30 18 110
20 80 50 40 32 120
15 135 75 45 27 165
30 120 75 60 48 180
20 180 100 60 36 220
40 160 100 80 64 240
25 225 125 75 45 275
50 200 125 100 80 300
30 270 150 90 54 330
13 325 169 65 25 351
60 240 150 120 96 360
35 315 175 105 63 385
70 280 175 140 112 420
40 360 200 120 72 440
104 234 169 156 144 442
80 320 200 160 128 480
45 405 225 135 81 495
90 360 225 180 144 540
50 450 250 150 90 550
100 400 250 200 160 600
55 495 275 165 99 605
34 544 289 136 64 612
60 540 300 180 108 660
110 440 275 220 176 660
26 650 338 130 50 702
65 585 325 195 117 715
120 480 300 240 192 720
153 425 289 255 225 731
70 630 350 210 126 770
130 520 325 260 208 780
75 675 375 225 135 825
140 560 350 280 224 840
80 720 400 240 144 880
208 468 338 312 288 884
150 600 375 300 240 900
85 765 425 255 153 935
160 640 400 320 256 960
90 810 450 270 162 990
170 680 425 340 272 1020
95 855 475 285 171 1045
39 975 507 195 75 1053
180 720 450 360 288 1080
100 900 500 300 180 1100
190 760 475 380 304 1140
105 945 525 315 189 1155
200 800 500 400 320 1200
110 990 550 330 198 1210
68 1088 578 272 128 1224
210 840 525 420 336 1260
115 1035 575 345 207 1265
25 1225 625 175 49 1275
120 1080 600 360 216 1320
220 880 550 440 352 1320
312 702 507 468 432 1326
125 1125 625 375 225 1375
230 920 575 460 368 1380
52 1300 676 260 100 1404
130 1170 650 390 234 1430
240 960 600 480 384 1440
306 850 578 510 450 1462
135 1215 675 405 243 1485
250 1000 625 500 400 1500
140 1260 700 420 252 1540
260 1040 650 520 416 1560
145 1305 725 435 261 1595
270 1080 675 540 432 1620
150 1350 750 450 270 1650
280 1120 700 560 448 1680
450 800 625 600 576 1700
155 1395 775 465 279 1705
290 1160 725 580 464 1740
65 1625 845 325 125 1755
160 1440 800 480 288 1760
416 936 676 624 576 1768
300 1200 750 600 480 1800
165 1485 825 495 297 1815
102 1632 867 408 192 1836
310 1240 775 620 496 1860
170 1530 850 510 306 1870
232 1450 841 580 400 1914
320 1280 800 640 512 1920
175 1575 875 525 315 1925
261 1421 841 609 441 1943
180 1620 900 540 324 1980
330 1320 825 660 528 1980
185 1665 925 555 333 2035
340 1360 850 680 544 2040
190 1710 950 570 342 2090
350 1400 875 700 560 2100
78 1950 1014 390 150 2106
195 1755 975 585 351 2145
360 1440 900 720 576 2160
459 1275 867 765 675 2193
200 1800 1000 600 360 2200
520 1170 845 780 720 2210
370 1480 925 740 592 2220
205 1845 1025 615 369 2255
380 1520 950 760 608 2280
Note that the list is terminated at the 100th solution.
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For tot = 3 To 99999
For x = 1 To tot / 3
DoEvents
y = tot - 2 * x
If x < y And (x + y) Mod 2 = 0 Then
prod = x * y
gm = Int(Sqr(prod) + 0.5)
If gm * gm = prod Then
hm = 2 * prod / (x + y)
If hm = Int(hm) Then
Text1.Text = Text1.Text & mform(x, "###") & mform(y, "#####") & " " & mform((x + y) / 2, "####") & mform(gm, "####") & mform(hm, "#####")
Text1.Text = Text1.Text & " " & mform(2 * x + y, "######") & crlf
solct = solct + 1
If solct = 100 Then Exit Sub
End If
End If
End If
Next x
Next
Text1.Text = Text1.Text & crlf & " done"
End Sub
Function mform$(x, t$)
If x <> Int(x) Then mform$ = Str$(x): Exit Function
a$ = Format$(x, t$)
If Len(a$) < Len(t$) Then a$ = Space$(Len(t$) - Len(a$)) & a$
mform$ = a$
End Function
Edited on April 17, 2016, 3:36 pm
|
Posted by Charlie
on 2016-04-17 15:30:22 |