Wednesday, January 13, 2010

Can't seem to nail down the equation for this problem...?

Would you rather work for a month (30 days) and get paid $1 million dollars or be paid 1 cent for the first day, 2 cents for the second day, 4 cents the third day, 8 cents the fourth day, and so on? I see the pattern, but can't seem to come up with the right equation...or is there one?Can't seem to nail down the equation for this problem...?
This is a geometric sequence. Recall that geomectic sequences take the form: S = Sum (i = 0 to n) a*r^i. In this case, a = 1, r = 2, and n = 30. So you have S = Sum (i = 0 to 30) 2^i. Remember to change the Sum to the capitol sigma.Can't seem to nail down the equation for this problem...?
Lets work it out.





d1 - 0.01


d2 - 0.02


d3 - 0.04


d4 - 0.08


d5 - 0.16


d6 - 0.32


d7 - 0.64


d8 - 1.28


d9 - 2.56


d10 - 5.12


d11 - 10.24


d12 - 20.48


d13 - 40.96


...


and so on until my hand gets sore.


Using a calculator it turns out he'd get $10,737,418.23 by that method.





And only $1,000,000 by the other method.











As for the equation, there's a quick way to work out the first one. Consider working for 5 days:


2^0 + 2^1 + 2^2 + 2^3 + 2^4 =


1 + 2 + 4 + 8 + 16 = 31 cent





But if you do: 2^5 - 1 (32cent - 1cent) you arrive at the same answer a lot faster.





So instead of doing:


2^0 + 2^1 + 2^2 + 2^3 ... 2^27 + 2^28 + 2^29 = answer


You can do: 2^30 - 1 = $10,737,418.23














Hope that helps.
u see the pattern but there is an equation

No comments:

Post a Comment