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

Home > Numbers
Product-Difference Crossed Power Poser (Posted on 2023-04-15) Difficulty: 4 of 5
Determine all possible triplet(s) of positive integers such that each of p*q-r, q*r-p, and r*p-q is a power of 2.
*** Adapted from a problem appearing in IMO 2015.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts solution Comment 2 of 2 |
keeping to the convention of
p <= q <= r and similarly for the values
     p     q     r   the formula values
     2     2     2     2     2    2
     2     2     3     1     4    4
     3     5     7     8    32    16
     2     6    11     1    64    16
------
import math

ans = []
big = 200
for p in range(1,big):
    for q in range(1,big):
        for r in range(1,big):
            x = p*q-r
            if x < 1:
                continue
            y = q*r-p
            if y < 1:
                continue
            z = r*p-q
            if z < 1:
                continue
            if (math.log(x,2))%1 != 0:
                continue
            if (math.log(y,2))%1 != 0:
                continue
            if (math.log(z,2))%1 != 0:
                continue
            pqr = sorted([p,q,r])
            xyz = sorted([x,y,z])
            if pqr+xyz not in ans:
                ans.append(pqr+xyz)
print (ans)

I also did a version checking if the log base 2 was very close to zero (within epsilon), but the results were the same.
I can't be sure larger numbers do not yield more solutions.

  Posted by Larry on 2023-04-15 13:39:55
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 (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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