# looping

• Feb 25th 2008, 06:56 PM
mimi1980
looping
hi, i cant figure out this equation and its making me nuts, a man gets 1 cent for the first day, it doubles everyday for 34 days................................next part, when would be become a millionaire?
• Feb 25th 2008, 07:53 PM
mr fantastic
Quote:

Originally Posted by mimi1980
hi, i cant figure out this equation and its making me nuts, a man gets 1 cent for the first day, it doubles everyday for 34 days................................next part, when would be become a millionaire?

$\displaystyle M= 1(2)^n$ where M is money (in cents) and n is number of days.

So sub n = 34 and solve for M.

Sub M = (however many cents are in one million dollars) and find the first integer valuem of n such that you've got at least a million dollars. Trial and error might be the best appoach here ..... Hint: From the first part you know n < 34 ......)
• Feb 25th 2008, 08:13 PM
Soroban
Hello, mimi1980!

Quote:

A man gets 1 cent for the first day, it doubles everyday for 34 days.
(a) How much will he have at the end of the period?
(b) When would be become a millionaire?

He gets: .$\displaystyle 1 + 2 + 4 + 8 + 16 + \hdots + 2^{33}$ cents.

This is a geometric series with first term 1 and common ratio 2.

The sum is: .$\displaystyle 2^{34}-1 \:=\: 17,179,869,183$ cents.

(a) He will have a total of: .$\displaystyle \$171,798,691.83$When does$\displaystyle 2^n - 1 \:=\:100,000,000$cents? We have: .$\displaystyle 2^n \:=\:100,000,001$Take logs: .$\displaystyle \ln(2^n) \;=\;\ln(100,000,001)\quad\Rightarrow\quad n\!\cdot\!\ln(2) \:=\:\ln(100,000,001)$Hence: .$\displaystyle n \;=\;\frac{\ln(100,000,001)}{\ln(2)} \;=\;26.5754...$(b) He becomes a millionaire on the 27th day. • Feb 25th 2008, 08:17 PM mr fantastic Quote: Originally Posted by Soroban Hello, mimi1980! He gets: .$\displaystyle 1 + 2 + 4 + 8 + 16 + \hdots + 2^{33}$cents. This is a geometric series with first term 1 and common ratio 2. The sum is: .$\displaystyle 2^{34}-1 \:=\: 17,179,869,183$cents. (a) He will have a total of: .$\displaystyle \$171,798,691.83$

When does $\displaystyle 2^n - 1 \:=\:100,000,000$ cents?

We have: .$\displaystyle 2^n \:=\:100,000,001$

Take logs: .$\displaystyle \ln(2^n) \;=\;\ln(100,000,001)\quad\Rightarrow\quad n\!\cdot\!\ln(2) \:=\:\ln(100,000,001)$

Hence: .$\displaystyle n \;=\;\frac{\ln(100,000,001)}{\ln(2)} \;=\;26.5754...$

(b) He becomes a millionaire on the 27th day.

So he keeps the money from each day ......? I assumed he only got whatever the money was on the final day ......