My Math Forum Alternating Sums of powers of 2

 Number Theory Number Theory Math Forum

 April 4th, 2011, 09: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 05:55 AM.
 April 4th, 2011, 11: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, 12:37 PM #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 05:52 AM.
 February 18th, 2019, 05: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 06: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 08:32 AM jwortko Calculus 1 November 5th, 2012 03:57 PM dwnielsen Number Theory 7 October 2nd, 2009 10:48 AM Salient Calculus 5 May 14th, 2009 04:31 PM ^e^ Real Analysis 8 March 28th, 2007 07:30 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top