Q:

Whats better: 1 million dollars in a month or a penny(USD) doubled (and added) every day for 30 days?

THis is a question that I remember when I was in the 5th grade that tested our logical reasoning skills. And it is a simple choice knowing that the pennies doubling every day is an exponential function, but I'm trying to figure out how to create a formula for this solution without adding everything up by hand.
I know this has to be some form of a recurrence relation, but I cant figure out how to solve it. so far I have written down 
$F(n) = 2F(n-1)$ which wolframalpha solves for me as $c_1 2^{n-1}$ (I don't know what the $c_1$ is, so I assume its a constant).
and then when I plug in 
$\sum_{n = 1}^{30} 2^{n-1}$ it spits out $\$1,073,741,823$
Which is wrong because when I sum up all the days I get $10,737,418.23
I think the main problem is the recurrence relation I set up, but its been so long since my discrete math class, I've forgotten completely how to set that up.

A:

Wolfram alpha is right, 1 penny is $0.01\$ $ so $c_1=0.01$. As it is a geometric series you could caluclate $c_1 2^{30}-1 $ directly. 
$c_1$ is the value you get at the first day.

A:

On day one, you receive $\$0.01\cdot 2^0$, on day two, $\$0.01\cdot 2$, and in general, on day $n$, $\$0.01\cdot 2^{n-1}$. Thus the total amount of money is
$$
\sum_{n=1}^{30} 0.01\cdot 2^{n-1}=0.01\cdot\sum_{n=0}^{29} 2^{n}=0.01\cdot(2^{30}-1)=\$10,737,418.23.
$$
If you haven't seen the identity used in the second equality, that might be worth verifying. So clearly we're better off waiting on the penny than taking the million dollars up front.

