My Math Forum  

Go Back   My Math Forum > College Math Forum > Number Theory

Number Theory Number Theory Math Forum


Reply
 
LinkBack Thread Tools Display Modes
April 4th, 2011, 08:57 PM   #1
Newbie
 
Joined: Mar 2011

Posts: 8
Thanks: 0

Alternating Sums of powers of 2

Hello,
Here's an interesting problem that I have solved, but would like someone else's input simply to see if people come up with the same solution or possibly find a more elegant one. I hope anyone who tries this has fun with the problem!

Which numbers can be written by selecting a subset of the powers of two and alternating them (positive-negative,..., negative-positive,...) and list them in increasing order to form a sum. *A sum cannot be made by simply one power of two, namely n=n. SO, can ALL positive integers be written this way? how many ways can a number 'n' be written as an alternating sum of powers of two?

Thanks in advance,
Rutzer

Last edited by skipjack; February 18th, 2019 at 04:55 AM.
Rutzer is offline  
 
April 4th, 2011, 10:48 PM   #2
Global Moderator
 
CRGreathouse's Avatar
 
Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 938

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms
Re: Alternating Sums of powers of 2

I think that all numbers can be written in this form, yes. I think there's a nice bijection with the binary digits of the number by taking the consecutive 1 bits and representing them as the difference of two powers of two.
CRGreathouse is offline  
April 5th, 2011, 11:37 AM   #3
Newbie
 
Joined: Mar 2011

Posts: 8
Thanks: 0

Re: Alternating Sums of powers of 2

Excellent, it seems we think alike! I took the binary approach as well. but I also saw the possibility for an induction... thanks for your response.
rutzer

Last edited by skipjack; February 18th, 2019 at 04:52 AM.
Rutzer is offline  
February 18th, 2019, 04:35 AM   #4
Newbie
 
Joined: Feb 2019
From: chengdu china

Posts: 1
Thanks: 0

I agree that all numbers seem to be expressible in this way and this can be shown with binary. I also think there are 2 ways to express all non-powers of 2, 1 ways to express powers of 2.

Last edited by skipjack; February 18th, 2019 at 05:00 AM.
xingzheli is offline  
Reply

  My Math Forum > College Math Forum > Number Theory

Tags
alternating, powers, sums



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Polynomial expressions for the sums of general powers. Alex138478 Number Theory 5 August 25th, 2013 07:32 AM
Help with alternating series jwortko Calculus 1 November 5th, 2012 02:57 PM
Alternating p-series dwnielsen Number Theory 7 October 2nd, 2009 09:48 AM
Alternating Series Salient Calculus 5 May 14th, 2009 03:31 PM
alternating series ^e^ Real Analysis 8 March 28th, 2007 06:30 PM





Copyright © 2019 My Math Forum. All rights reserved.