My Math Forum Alternating Sums of powers of 2

 Number Theory Number Theory Math Forum

 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.
 April 4th, 2011, 10:48 PM #2 Global Moderator     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.
 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.
 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.

 Tags alternating, powers, sums

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post Alex138478 Number Theory 5 August 25th, 2013 07:32 AM jwortko Calculus 1 November 5th, 2012 02:57 PM dwnielsen Number Theory 7 October 2nd, 2009 09:48 AM Salient Calculus 5 May 14th, 2009 03:31 PM ^e^ Real Analysis 8 March 28th, 2007 06:30 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top