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

Home > Just Math
All powers of 2 (Posted on 2025-03-16) Difficulty: 4 of 5
Find all positive integers (a,b,c) such that ab-c, bc-a, ca-b are all powers of 2.

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts Computer solution Comment 2 of 2 |
wlog, assume a ≤ b ≤ c
(a,b,c) --> the powers of 2
(2,2,2) --> (2,2,2)
(2,2,3) --> (1,4,4)
(2,6,11) --> (1,64,16)
(3,5,7) --> (8,32,16)
"""
import math
big = 1000
top = 1 + int(math.log(big**2,2))
pow2s = [2**i for i in range(top+1)]
for a in range(1,big+1):
    for b in range(a,big+1):
        for c in range(b,big+1):
            if a*b-c not in pow2s:
                continue
            if b*c-a not in pow2s:
                continue
            if c*a-b not in pow2s:
                continue
            print('({},{},{}) --> ({},{},{})'.format(a,b,c,a*b-c,b*c-a,c*a-b))

  Posted by Larry on 2025-03-16 10:43:52
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 - 2025 by Animus Pactum Consulting. All rights reserved. Privacy Information