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

Home > Numbers
Multiply Together, Get Cubic (Posted on 2007-06-21) Difficulty: 4 of 5
Determine all possible integer pairs (p,q) such that p+q+s=pqs, where s=gcd(p,q) and gcd denotes the greatest common divisor.

No Solution Yet Submitted by K Sengupta    
Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re: if s = 1 (one more solution!) | Comment 7 of 8 |
(In reply to if s = 1 (one more solution!) by Steve Herman)

In addition to (-1,0), there's also (-1,-1) where s=1 also, as -1+1+1 = (-1)(-1)(1).

10   for Tot=0 to 1000000
20   for P=0 to Tot
30   Q=Tot-P
40   S=gcd(P,Q)
50   if P+Q*Q+S*S*S=P*Q*S then print P;Q
51   if -P+Q*Q+S*S*S=-P*Q*S then print -P;Q
52   if P+Q*Q+S*S*S=-P*Q*S then print P;-Q
53   if -P+Q*Q+S*S*S=P*Q*S then print -P;-Q
60   next
70   next
shows 
 0  0
 0  0
 0  0
 0  0
-1  0
-1  0
-1 -1
 4  2
 5  2
 5  3
 4  6

but the (0,0) lines are extraneous, as gcd(0,0) is really undefined, but the programming language returns a zero.

Also, as before, the totals were not allowed to get up to 1,000,000, so the upper limit of testing was not tested that high.

Edited on June 22, 2007, 9:37 am
  Posted by Charlie on 2007-06-22 09:32: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 (4)
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