View Single Post
Old 12-29-2011, 10:37 AM   #181
HungLikeJesus
Only looks like a disaster tourist
 
Join Date: Feb 2007
Location: above 7,000 feet
Posts: 7,208
Quote:
Originally Posted by glatt View Post
Don't forget that you have to add each nail together. So your calculation is correct for finding the price of the final nail. I don't remember if there is a formula for doing a sum of numerous equations. There must be, and I just can't remember it.

When I break out my calculator and do a tedious 3 minutes of punching numbers in, I get a total of $42,949,652.95
Good point. I think the easy way to do it would be to double the cost of the last and subtract one.

(2^(n-1) * 2)-1 = (2^n) -1
(2^32) -1 = 4294967295 (cents)
$42,949,672.95, which agrees with your results.
__________________
Keep Your Bodies Off My Lawn

SteveDallas's Random Thread Picker.
HungLikeJesus is offline   Reply With Quote