Quote:
Originally Posted by glatt
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.