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

Home > Just Math
Fraction Sum Satisfaction (Posted on 2014-08-09) Difficulty: 3 of 5
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.)
Solution 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$


Private Sub Form_Load()
 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

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (1)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information