All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Fraction Sum Satisfaction (Posted on 2014-08-09)
Determine all possible pairs (x,y) of positive integers such that gcd(x,y)=1 and x/y + 14y/(9x) is an integer.

Prove that there are no others.

 No Solution Yet Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solutions Comment 3 of 3 |
Listing x, y, x/y, 14y/(9x), x/y+14y/(9x):

1 3 .333333333333333 4.66666666666667 5
2 3 .666666666666667 2.33333333333333 3
7 3 2.33333333333333 .666666666666667 3
14 3 4.66666666666667 .333333333333333 5

DefDbl A-Z
Dim crlf\$

ChDir "C:Program Files (x86)DevStudioVBprojects looble"
Text1.Text = ""
crlf\$ = Chr(13) + Chr(10)
Form1.Visible = True
DoEvents

For tot = 2 To 1000
For x = 1 To tot - 1
y = tot - x
If gcd(x, y) = 1 Then
v = x / y + 14 * y / (9 * x)
vr = Int(v + 0.5)
If Abs(v - vr) / v < 0.0000000001 Then
Text1.Text = Text1.Text & Str(x) & Str(y) & Str(x / y) & Str(14 * y / (9 * x)) & Str(x / y + 14 * y / (9 * x)) & crlf
DoEvents
End If
End If
Next
Next

End Sub

Function gcd(a, b)
x = a: y = b
Do
z = x Mod y
x = y: y = z
Loop Until z = 0
gcd = x
End Function

Edited on August 9, 2014, 1:17 pm
 Posted by Charlie on 2014-08-09 13:16:49

 Search: Search body:
Forums (45)