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

Home > Numbers
Unusual binary representation (Posted on 2005-06-14) Difficulty: 3 of 5
Show that every positive integer is an alternating sum of strictly increasing powers of 2.

For example, 5=2^0 -2^2 +2^3 and 8=-2^3 +2^4 are alternating sums of strictly increasing powers of 2 (8=2^3 is ok too).

10=-2^1 -2^2 +2^4 is a strictly increasing sum but not alternating.

4=2^1 -2^1 +2^2 is alternating but not strictly increasing.

(author: prof Dan Shapiro of Ohio State University)

See The Solution Submitted by McWorter    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution a slightly different proof | Comment 8 of 9 |

Certainly every positive integer can be written as the sum of (positive) strictly decreasing powers of 2 -- that's just its binary representation (I know the problem asks for increasing, but any strictly decreasing alternating representation can be reversed for a strictly increasing one--I'll do that last).  so a number N = 2^a+2^b+2^c... and so on, where a> b > c...

Now write every 2^i as (2^i+1 -2^i) (which it is; 2^i+1 = 2*2^i and 2*2^i - 2^i = 2^i). Then N = (2^a+1 - 2^a) + (2^b+1 -  2^b) + (2^c+1 - 2^c) + ... This is clearly alternating, but it's not quite a solution--it may be that a=b+1 (or that any two consecutive exponents differ by one.) In that case, the -2^a and the +2^b+1 cancel each other out and disappear from the representation, and since we've removed one consecutive -/+ pair from an alternating sequence, the resulting sequence is still alternating.

Eliminate all such matching terms, and then re-order the terms in reverse order. You now possess a representation of your number N which is an alternating sum of strictly increasing powers of two.


  Posted by Paul on 2005-06-18 01:46:25
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