Define T(N) as the Nth triangular number.
Each of X and Y is a positive integer such that:
Each of T(X)+T(Y) and X+Y is a triangular number.
Does there exist an infinite number of pairs (X,Y) that satisfy the given conditions? Give reasons for your answer.
DefDbl A-Z
Dim crlf$
Function mform$(x, t$)
a$ = Format$(x, t$)
If Len(a$) < Len(t$) Then a$ = Space$(Len(t$) - Len(a$)) & a$
mform$ = a$
End Function
' 51372 96324 1319566878 4639204650 5958771528 147696
Private Sub Form_Load()
ChDir "C:\Program Files (x86)\DevStudio\VB\projects\flooble"
Text1.Text = ""
crlf$ = Chr(13) + Chr(10)
Form1.Visible = True
DoEvents
tot = 1
For t = 2 To 1000
tot = tot + t
For x = 1 To tot / 2
y = tot - x
tx = x * (x + 1) / 2
ty = y * (y + 1) / 2
If isTri(tx + ty) Then
Text1.Text = Text1.Text & mform(x, "#####0") & mform(y, "#####0") & " " & mform(tx, "############0") & mform(ty, "############0")
Text1.Text = Text1.Text & mform(tx + ty, "############0") & mform(tot, "############0") & crlf
DoEvents
End If
Next
Next
Text1.Text = Text1.Text & crlf & " done"
End Sub
Function isTri(t)
n = Int(Sqr(t * 2))
np = n + 1
If n * np = 2 * t Then isTri = n Else isTri = 0
End Function
finds many, many results, starting with
x y T(x) T(y) T(x)+T(y) x+y
6 9 21 45 66 15
14 14 105 105 210 28
10 26 55 351 406 36
12 24 78 300 378 36
15 21 120 231 351 36
17 49 153 1225 1378 66
33 45 561 1035 1596 78
36 69 666 2415 3081 105
30 90 465 4095 4560 120
44 76 990 2926 3916 120
51 69 1326 2415 3741 120
35 155 630 12090 12720 190
81 109 3321 5995 9316 190
108 145 5886 10585 16471 253
95 230 4560 26565 31125 325
150 201 11325 20301 31626 351
91 315 4186 49770 53956 406
80 355 3240 63190 66430 435
186 249 17391 31125 48516 435
126 370 8001 68635 76636 496
172 324 14878 52650 67528 496
221 275 24531 37950 62481 496
53 475 1431 113050 114481 528
45 516 1035 133386 134421 561
87 474 3828 112575 116403 561
126 435 8001 94830 102831 561
171 390 14706 76245 90951 561
220 341 24310 58311 82621 561
240 321 28920 51681 80601 561
274 287 37675 41328 79003 561
189 406 17955 82621 100576 595
161 469 13041 110215 123256 630
135 531 9180 141246 150426 666
174 492 15225 121278 136503 666
285 381 40755 72771 113526 666
109 594 5995 176715 182710 703
153 550 11781 151525 163306 703
244 459 29890 105570 135460 703
286 494 41041 122265 163306 780
351 469 61776 110215 171991 820
98 805 4851 324415 329266 903
183 720 16836 259560 276396 903
and stopping at the following only because the text box has reached its capacity at 923 results:
2619 95284 3430890 4539567970 4542998860 97903
41958 55945 880257861 1564949485 2445207346 97903
43850 54053 961433175 1460890431 2422323606 97903
16330 82016 133342615 3363353136 3496695751 98346
37722 60624 711493503 1837665000 2549158503 98346
47974 50372 1150776325 1268694378 2419470703 98346
34516 64719 595694386 2094306840 2690001226 99235
8340 91341 34781970 4171634811 4206416781 99681
42720 56961 912520560 1622306241 2534826801 99681
48895 50786 1195384960 1289634291 2485019251 99681
23584 76544 278114320 2929530240 3207644560 100128
1836 99189 1686366 4919278455 4920964821 101025
41970 59055 880761435 1743776040 2624537475 101025
43296 57729 937293456 1666347585 2603641041 101025
29845 71630 445376935 2565464265 3010841200 101475
10324 91602 53297650 4195509003 4248806653 101926
27216 74710 370368936 2790829405 3161198341 101926
35452 66474 628439878 2209429575 2837869453 101926
22508 79870 253316286 3189648385 3442964671 102378
782102049 306153 5207050225 5207356378 102831
44070 58761 971104485 1726456941 2697561426 102831
44631 58200 995985396 1693649100 2689634496 102831
26370 76915 347701635 2957997070 3305698705 103285
11150 92590 62166825 4286500345 4348667170 103740
44655 59541 997056840 1772595111 2769651951 104196
32438 72215 526128141 2607539220 3133667361 104653
26837 78274 360125703 3063448675 3423574378 105111
31800 73311 505635900 2687288016 3192923916 105111
51274 53837 1314537175 1449238203 2763775378 105111
16356 89214 133767546 3979613505 4113381051 105570
19475 86555 189647550 3745927290 3935574840 106030
22951 83079 263385676 3451101660 3714487336 106030
26380 79650 347965390 3172101075 3520066465 106030
39314 66716 772814955 2225545686 2998360641 106030
45441 60589 1032464961 1835543755 2868008716 106030
7617 98874 29013153 4888083375 4917096528 106491
42756 63735 914059146 2031106980 2945166126 106491
48399 58092 1171255800 1687369278 2858625078 106491
24150 82803 291623325 3428209806 3719833131 106953
Shortening the output to just x and y allows more results to appear, 2415 of them, up to x=245804, y=254696.
|
Posted by Charlie
on 2014-08-30 14:46:28 |