document.write( "Question 363922: I haven't taken algebra in quite a few years. I'm trying to program a program to do a simple calculation. In order to do this, I have to know how to setup a word problem. My problem is to calculate how many weeks it would take to become a millionaire if I put 1 cent in my piggy bank one week, 2 cents the next week for a total of 3 cents, 3 cents the next week for a total of 6 cents, etc until I reach 1 million. I don't know how to set this up. \n" ); document.write( "
Algebra.Com's Answer #259549 by stanbon(75887)\"\" \"About 
You can put this solution on YOUR website!
My problem is to calculate how many weeks it would take to become a millionaire if I put 1 cent in my piggy bank one week, 2 cents the next week for a total of 3 cents, 3 cents the next week for a total of 6 cents, etc until I reach 1 million. I don't know how to set this up.
\n" ); document.write( "---
\n" ); document.write( "Series: 1+2+3+....+n = 100,000,000 cents
\n" ); document.write( "-----
\n" ); document.write( "Sum = (n/2)(1+n)
\n" ); document.write( "----
\n" ); document.write( "100,000,000 = (n/2)(1+n)
\n" ); document.write( "200,000,000 = n +n^2
\n" ); document.write( "-------
\n" ); document.write( "n^2+n-200,000,000 = 0
\n" ); document.write( "---
\n" ); document.write( "n = 14142 when rounded up
\n" ); document.write( "-------
\n" ); document.write( "That is the number of weeks you will need.
\n" ); document.write( "---
\n" ); document.write( "You will overshoot your goal by $25.77
\n" ); document.write( "but you will probably not be around to know it
\n" ); document.write( "unless you start very young.\r
\n" ); document.write( "\n" ); document.write( "============================================
\n" ); document.write( "Cheers,
\n" ); document.write( "Stan H.
\n" ); document.write( "
\n" );