S.O.S. Mathematics CyberBoard

Your Resource for mathematics help on the web!
It is currently Tue, 23 Dec 2014 01:05:06 UTC

All times are UTC [ DST ]




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: Sum of powers of 2
PostPosted: Fri, 22 Jan 2010 02:23:07 UTC 
Offline
S.O.S. Oldtimer
User avatar

Joined: Sun, 6 Apr 2008 23:49:57 UTC
Posts: 143
Is there a closed formula for the first n powers of an integer? In particular, is there a closed formula for 2^1+\cdots+2^n?


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 22 Jan 2010 02:27:04 UTC 
Offline
Site Admin
User avatar

Joined: Sat, 26 Apr 2003 22:14:40 UTC
Posts: 2120
Location: El Paso TX (USA)
2^{n+1}-2

_________________
The greater danger for most of us lies not in setting our aim too high and falling short; but in setting our aim too low, and achieving our mark. - Michelangelo Buonarroti


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 22 Jan 2010 07:14:56 UTC 
Offline
Member of the 'S.O.S. Math' Hall of Fame
User avatar

Joined: Wed, 1 Oct 2003 04:45:43 UTC
Posts: 9861
It's actually 2^{n+1}-1


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 22 Jan 2010 09:02:49 UTC 
Offline
Site Admin
User avatar

Joined: Sat, 26 Apr 2003 22:14:40 UTC
Posts: 2120
Location: El Paso TX (USA)
No, Matt. Your formula would be correct if the sum started with 2^0.
:wink:


Top
 Profile  
 
 Post subject: Re: Sum of powers of 2
PostPosted: Fri, 22 Jan 2010 16:25:11 UTC 
Offline
Member of the 'S.O.S. Math' Hall of Fame

Joined: Mon, 19 May 2003 19:55:19 UTC
Posts: 8164
Location: Lexington, MA
Hello, lepton!

Quote:
Is there a closed formula for the first n powers of an integer?
In particular, is there a closed formula for 2^1+2^2 +\cdots+2^n
?

Yes, you have a geometric series
. . with first term a = 2, common ratio r = 2, and n terms.

The sum is: .$S \;=\;a\,\frac{1-r^n}{1-r}

So we have: .$2\,\frac{1-2^n}{1-2}\;=\;2(2^n-1) . . . as helmut pointed out.


~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~


You could derive the formula with a little acrobatics.


\begin{array}{ccccc}\text{We have:} & S&=& 2 + 2^2 + 2^3 + 2^4 + \hdots + 2^n \qquad & [1] \\
\text{Multiply by 2:} & 2S &=& \qquad\quad 2^2 + 2^3 +  2^4 + \hdots + 2^n + 2^{n+1} & [2]\\\end{array}


Subtract [1] from [2]: . S \;=\;2^{n+1} - 2



Top
 Profile  
 
 Post subject: Re: Sum of powers of 2
PostPosted: Sat, 23 Jan 2010 06:00:20 UTC 
Offline
Member of the 'S.O.S. Math' Hall of Fame
User avatar

Joined: Wed, 1 Oct 2003 04:45:43 UTC
Posts: 9861
helmut wrote:
No, Matt. Your formula would be correct if the sum started with 2^0.
:wink:

Indeed you are right. My mistake. :)

Soroban wrote:
The sum is: .$S \;=\;a\,\frac{1-r^n}{1-r}

This formula is not at all natural. It's easier to think of sum in terms of binary numbers...


Top
 Profile  
 
 Post subject:
PostPosted: Sat, 23 Jan 2010 23:38:44 UTC 
Offline
S.O.S. Oldtimer
User avatar

Joined: Sun, 6 Apr 2008 23:49:57 UTC
Posts: 143
Sweet, thank you very much everybody.


Top
 Profile  
 
 Post subject: Re: Sum of powers of 2
PostPosted: Mon, 25 Jan 2010 17:48:20 UTC 
Offline
Moderator
User avatar

Joined: Wed, 30 Mar 2005 04:25:14 UTC
Posts: 14346
Location: Austin, TX
Matt wrote:
helmut wrote:
No, Matt. Your formula would be correct if the sum started with 2^0.
:wink:

Indeed you are right. My mistake. :)

Soroban wrote:
The sum is: .$S \;=\;a\,\frac{1-r^n}{1-r}

This formula is not at all natural. It's easier to think of sum in terms of binary numbers...


or r-ary numbers for the general case.

_________________
(\ /)
(O.o)
(> <)
This is Bunny. Copy Bunny into your signature to help him on his way to world domination


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Contact Us | S.O.S. Mathematics Homepage
Privacy Statement | Search the "old" CyberBoard

users online during the last hour
Powered by phpBB © 2001, 2005-2011 phpBB Group.
Copyright © 1999-2013 MathMedics, LLC. All rights reserved.
Math Medics, LLC. - P.O. Box 12395 - El Paso TX 79913 - USA