For what triplets (x, y, n) of positive integers is the equation
(x−y)^ n = xy ?
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For tot = 1 To 3000
For n = 1 To 50
For y = 1 To (tot - n) / 2
DoEvents
x = tot - n - y
pwr = (x - y) ^ n
If pwr = x * y Then
Text1.Text = Text1.Text & x & Str(y) & Str(n) & crlf
End If
Next
Next
Next tot
Text1.Text = Text1.Text & crlf & " done"
End Sub
finds
4 2 3
18 12 3
48 36 3
100 80 3
180 150 3
294 252 3
448 392 3
648 576 3
900 810 3
1210 1100 3
annotated, this is:
ratio
x,y,n x:y x y
4 2 3 2:1 2
18 12 3 3:2 6 4 (k+1)*(k^2+k) k*(k^2+k)
48 36 3 4:3 12 6
100 80 3 5:4 20 8
180 150 3 6:5 30 10
294 252 3 7:6 42 12
448 392 3 8:7 56 14
648 576 3 9:8 72 16
900 810 3 10:9 90 18
1210 1100 3 11:10 110 20
Apparently you can set x = (k+1)*(k^2+k) and y = k*(k^2+k) for any k. And n=3 only.
|
Posted by Charlie
on 2017-01-07 14:46:42 |