Fred is an incredibly talented investor: so talented, in fact, that he doubles the amount of money in his bank account each year.
Fred doesn't worry about running out of money, so he spends increasing amounts every year, and never makes any deposits other than his original deposit. At the beginning of the first year (right after the original deposit), he spends $1. At the beginning of the second year, he spends $2. At the beginning of the third year, he spends $3, and so on.
What is the minimum amount of money (in dollars) Fred needs in his original deposit so that he never runs out of money?
Note : As an explicit example, this is what would happen if the initial deposit was $20:
Year 1 2 3 4 Account at the beginning of year $ 2 0 $ 3 8 $ 7 2 $ 1 3 8 Amount spent $ 1 $ 2 $ 3 $ 4 Account after spending $ 1 9 $ 3 6 $ 6 9 $ 1 3 4 Account after doubling $ 3 8 $ 7 2 $ 1 3 8 $ 2 6 8
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I get zero at 5th year. What did I do wrong? Thanks.
Year 1 4 1 3 6 2 6 2 4 8 3 8 4 4 8 4 8 8 0 0 5 0 16 -16 -32 6 -32 32 -64 -128
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
1 2 3 4 5 6 7 8 9 10 |
|
Log in to reply
1 2 3 4 5 6 7 8 9 10 |
|
actually it don't need calculation, logically we can guess that the answer must be a small number, 1 and 2 cannot come, therefore start checking from 3 in which the series terminate. so check for 4 and it will expand, answer.
Log in to reply
That is how I did it.
Actually, it does need calculation, there are more numbers besides integers. Does 3.9 work? What about 3.99 or 3.9999999?
If Fred lives forever and he keeps on doing this pattern, how much money will he have when Earth is no longer a habitable planet and the world ends after one billion years? (The earth won't be habitable because the sun will increase by 10%.) Will he be a trillionare?
Log in to reply
Yes, very comfortably (will do the detailed calculations in due course - but I do not need to do them to be able to answer your question the affirmative).
Anne Lee, take a look at my solution somewhere below. It answers your question.
First of all my comment yesterday was erroneous - if he starts with the minimum whole number of dollars to avoid ever going to zero ($4) it tjurns out that at the end of year 1 billion his balance will be £2,000,000,004 (two billion and four dollars). However if he starts with $5 his balance at the end of year 1 billion will be a number with approximately 300 million digits. I have experimented briefly with starting points of $4.50 ($1048 at end of year 10) and $4.25 ($538 at end of year 10) and the indications are that from these starting points he will definitely be a trillionaire by year 1 billion. I suggest that the lowest point from which he could be a trillionaire will be somewhere around $4.10 (allow five cents either side).
Log in to reply
Thomas, take a look at my solution somewhere below, I have exact formula.
Not, he would not. But, he would be a multi-billionaire, just barely.
Let a 0 be the original deposit, and a n the amount at the end of the n th year (after doubling, before spending). The recipe given in the problem translates to the recurrence relation a n = 2 ( a n − 1 − n ) = 2 a n − 1 − 2 n .
We expect the growth of a n to be approximately exponential with growth factor 2, but not exactly because of the amount taken out. Therefore we suppose that the sequence b n = a n + p n + q grows exponentially as b n = 2 b n − 1 . Use this to determine p , q : b n = 2 b n − 1 a n + p n + q = 2 a n − 1 + 2 p ( n − 1 ) + 2 q a n = 2 a n − 1 + p n + ( q − 2 p ) . From the recurrence relation for ( a n ) , we see that p = − 2 and q = − 4 . Thus the sequence b n = a n − 2 n − 4 grows exponentially, with b n = 2 n b 0 . If b 0 < 0 , the amount will grow exponentially but negative, making Fred go into the red quickly. If b 0 > 0 , the amount will grow exponentially and positive. The borderline case, b 0 = b n = 0 is the most interesting; the account will grow linearly according to a n = 2 n + 4 and a 0 = 4 .
Let a be the starting amount and a n the amount of money at the beginning of each year after spending (i.e. corresponding to "Account after spending" column). Then, a n = 2 a n − 1 − n . So, first few values are
a 1 a 2 a 3 a 4 a 5 = a − 1 = 2 a − 2 ⋅ 1 − 2 = 2 2 a − 2 2 ⋅ 1 − 2 ⋅ 2 − 3 = 2 3 a − 2 3 ⋅ 1 − 2 2 ⋅ 2 − 2 ⋅ 3 − 4 = 2 4 a − 2 4 ⋅ 1 − 2 3 ⋅ 2 − 2 2 ⋅ 3 − 2 ⋅ 4 − 5
and at this point we are comfortable enough to say that a n = 2 n − 1 a − ∑ k = 1 n 2 n − k k (and then prove it by induction).
To arrive at formula for a n , first we need to deal with b n = ∑ k = 1 n 2 n − k k = 2 n − 1 ∑ k = 1 n k ( 2 1 ) k − 1 .
So, define p n ( x ) = ∑ k = 1 n k x k − 1 . Obviously, b n = 2 n − 1 p n ( 1 / 2 ) . Notice that p n ( x ) = ( ∑ k = 1 n x k ) ′ = ( 1 − x 1 − x n + 1 ) ′ = ( 1 − x ) 2 1 − ( n + 1 ) x n + n x n + 1 for x = 1 , and thus, p n ( 1 / 2 ) = 2 1 − n ( 2 n + 1 − n − 2 ) and b n = 2 n + 1 − n − 2 . Finally, we get that a n = 2 n − 1 ( a − 4 ) + n + 2 .
From here it is obvious that a ≥ 4 , otherwise a n will eventually become negative (since exponential function grows faster than linear function). Also, note that for a = 4 we get a n = n + 2 , so to answer a question that was raised in comments, Fred will not become a trillionaire after billion years if he deposited 4$ at the beginning, but only a billionaire. But, if he were to deposit 4.01$ at the beginning, he would become trillionaire after 48 years. Exponential growth is stupidly fast and that's why banks don't double your money each year.
...
n. f(x) = (2^n)*x + K
f'(x) = 2^n
Does not work for n = 0 or n = 1 But works for n = 2 Note:
If n is an element of the negative set of reals we get an irrelevant number.
If n is an element of (0,1)u(1,2) then we also irrelevant numbers.
Therefore: 4 is the minimum.
Call the answer N.
Then N/2 equals the amount he would need the initial deposit to be if he postponed each withdrawal by 1 year. (I.e. at the beginning of the first year, he spends $0. At the beginning of the second year, he spends $1. At the beginning of the third year, he spends $2, and so on.)
Therefore, N/2=N-N/2= {the amount he would need the initial deposit to be if he simply withdrew $1 each year} = $2.
Therefore, N=$4.
Mathematica :
t=1;NestList[2(#-t++)&,4,50]
this is for $4 and 50 years. If you replace 4 with 3, you'll get negative values
Does the computer also tell you what to do?
At this problem. We can think only first two years for minumum deposit's calculation. Because you should earn nothing in 2 years after withdrawling 2 dollars.
So lets say n is the first deposit. First years income should be equal to second years first money (before withdrawl of 2 dollars).
2 (n-1) = n + 2
2n - 2 = n + 2
n = 4
This is the easiest method compared to others i think.
You go on trying with 1 ,2,3,4....Finally 4 fits in!
Does 3.99 fit? There are more numbers than integers.
Log in to reply
I tried that, and it doesn't. With a $4 initial investment, his balance grows linearly. If he's even 1¢ short of this, this shortage will double each year, and thereby make him bankrupt come year 12.
Log in to reply
Have you tried 3.999? 3.999999? There are infinitely many numbers between 3.99 and 4 and there is no hope to check all the possibilities in such a manner. Tl;dr: you need a proof that $4 is the minimum and checking number by number is not a proof.
Log in to reply
@Denis Husadzic – No matter by what fraction of a yoctocent the Fred's initial investment falls short of $4, the amount by which his balance is less than what he would have had he invested $4 still doubles each year. We have a linear function minus an exponential function, so the exponential function will dominate.
Log in to reply
@Stewart Gordon – @Stewart Gordon, of course, but that fact has nothing to do with trying random integers and thinking that is a correct solution.
I solved this by setting it up as a Difference equation , where each step is defined by the previous step. We find the amount of money from the previous year, subtract by what year we are now, and double that value.
x(n) = 2( x(n-1) - n )
another way to write this is:
x(n+1) = 2*(x(n) - n - 1)
x(n+1) - 2x(n) = - 2n - 2
The solution to this equation is:
x(n) = C*2^n + 2n + 4 , where C ϵ ℝ
By choosing an initial value by setting x(0) = something, we can determine the constant C, and finding the amount for whatever year we want.
We can now se that if we set C<0, C*2^n grows exponentially negative. So the smallest C is 0, which gives us the initial value :
x(0) = 0 2^n + 2 0 + 4 = 4
from this we can also easily find the amount of money for a year. For x(0) = 4, at year 5000, the money has grown to x(5000) = 2*5000 + 4 = 10004
The logical solution one can't have money spent equal to money left in bank after spending. Now as up to 3$ after the first year the money gets equal or less, 4$ should be the ans.
I solved this using a mixture of nth term and limits to infinity.
If we take his initial investment as $x then we can recreate the table like below.
Account at the beginning of the year | Amount Spent | Account after spending | Account after doubling |
x | 1 | x-1 | 2x-2 |
2x-2 | 2 | 2x-4 | 4x-8 |
4x-8 | 3 | 4x-11 | 8x-22 |
8x-22 | 4 | 8x-26 | 16x-52 |
16x-52 | 5 | 16x-57 | 32x-114 |
It is the values in the Account after spending that we are especially interested in - this can't get below or equal to 0 as Fred will have no money left to invest.
If we take a value in that column to be ax-b we can find the nth term for both a and b.
a is a simple geometric sequence: 1 2 4 8 16 will be 2 n − 1
b is slightly more complicated. 1 4 11 26 57. The difference between these are 3 7 15 31 then 4 8 16.
We end up with a geometric sequence of 4 ∗ 2 n − 1 . From there we can find the full nth term of b to be 4 ∗ 2 n − 1 − n − 2 .
Therefore we have 2 n − 1 x = 4 ∗ 2 n − 1 − n − 2 . x = 2 n − 1 4 ∗ 2 n − 1 − n − 2
Because we are interested in Josh doing this for the long term our answer is lim n → ∞ 2 n − 1 4 ∗ 2 n − 1 − n − 2 = 4
1 2 3 ⋮ a n − 1 ( a n − 1 ) × 2 − n ( ( a n − 1 ) × 2 − n ) − n ⋮ n 1 2 3 4 5 a = 1 0 a = 2 1 0 a = 3 2 2 1 0 a = 4 3 4 5 6 7
Called D 0 the original deposit, at the end of each year the amount is
D ( n ) = 2 n D 0 − 1 ⋅ 2 n − 2 ⋅ 2 n − 1 − 3 ⋅ 2 n − 2 … = 2 n D − 2 n + 1 ∑ i = 1 n 2 i i
So, by direct calculation we obtain that
D ( n ) = 2 n ( D 0 − 4 ) + 2 n + 4 ,
from which we can deduce that the initial deposit should be D 0 ≥ 4 to have D ( n ) ≥ 0 , ∀ n ≥ 1
Thinking about his situation, I thought of the least integers like 2,3,4. I thought of 2 but after three steps, money would get over. Then it comes for 3, money would over on fifth steps.Then I thought of 4 which on thinking up to many steps, money would never get over.
If you have k dollars in deposit and it's the n-th year you have (k - n) dollars in deposit at the end of the year. In order to have some money to spend the next year we want to increase the initial deposit of any generic year so that k <2(k-n). We have k - n > k/2 .This proves that necessarly k-n >= k/2 + 1. So at the begenning of the (n+1)-th year i have 2(k-n) = k+2. Now i can spend n + 1 dollars so at the end of the year we have 2(k - n) -(n+1) = k - n + 1 where again figures out the quantity k - n, so we can repeat the procedure and find an increasing sequence: each year my deposit increases by one which is the minimum quantity. Since we start with n = 1-> k-1 = k/2 + 1 -> k=4
I'll try to give the most complete solution I can, sorry if it is unclear in some parts as this is my first post.
Let the original amount Fred deposits to be denoted as $ α .
This means that:
Year 1 = α − 1
Year 2 = 2 ( α − 1 ) − 2 = 2 α − 2 − 2 = 2 α − 4
Year 3 = 2 ( 2 α − 4 ) − 3 = 4 α − 8 − 3 = 4 α − 1 1
Year 4 = 2 ( 4 α − 1 1 ) − 4 = 8 α − 2 2 − 4 = 8 α − 2 6
We will denote the general formula for year n as F n ( α ) .
The coefficient of α is 2 n − 1 .
The amount we subtract, we'll call k n , such that F n ( α ) = 2 n − 1 − k n .
To find k n , we look at k 1 , k 2 , k 3 and k 4 .
Notice how we can write them as:
k 1 = 1 = 2 2 − 3
k 2 = 4 = 2 3 − 4
k 3 = 1 1 = 2 4 − 5
k 4 = 2 6 = 2 5 − 6
This gives us the general formula: k n = 2 n + 1 − ( n + 2 ) and therefore,
F n ( α ) = 2 n − 1 α − 2 n + 1 + ( n + 2 )
F n ( α ) = 2 n − 1 α − 4 ( 2 n − 1 ) + ( n + 2 )
F n ( α ) = 2 n − 1 ( α − 4 ) + ( n + 2 )
Given that 2 n − 1 increases exponentially while ( n + 2 ) increases linearly as n increases, there will always be a value of n for which 2 n − 1 ( α − 4 ) > ( n + 2 ) if α < 4 therefore the minimum value of α for which F n ( α ) = 0 for any value of n is α = 4 .
Analizing the first terms of the series
a 1 = 2 ( a 0 − 1 )
a 2 = 2 ( a 0 − 2 )
...
a n = 2 ( a n − 1 − n )
Writing down and analyzing you can observe that this resumes to this:
a n = 2 n ( a 0 − 4 ) + 2 n + 4
that can be analized to se that if a 0 < 4 then it converges to -infinity, else to +infinity
Problem Loading...
Note Loading...
Set Loading...
The solution is pretty easily found through trial-and-error. For example, try $3:
Then you can test different values until you come upon the value of $4 that works. However, there's a reason the answer is $4.
Suppose that we'd like Fred's funds to last exactly 4 years. Now consider just the $4 that needs to be spent in the fourth year. In order for that money to be there in the fourth year, it needs to exist ("in part") in the original deposit. "In part", because we only need an amount that will double to $4 by the fourth year. There are three doublings that occur in that time. Working backwards, we halve $4 three times to get the amount needed in the original deposit: $ 4 ( 2 1 ) 3 = $ 0 . 5 0 . We can likewise perform this calculation with the other years, taking into account how many times each amount needs to be halved:
Amount needed so that funds last exactly 4 years = $ 1 ( 2 1 ) 0 + $ 2 ( 2 1 ) 1 + $ 3 ( 2 1 ) 2 + $ 4 ( 2 1 ) 3 = $ 3 . 2 5
You can test this amount by following the process shown above. The problem with this approach is that we'd like the money to last an infinite number of years. Fortunately, we can detect a pattern in the sum above, and we can express that pattern as an infinite series:
k = 1 ∑ ∞ k ( 2 1 ) k − 1 = 1 ( 2 1 ) 0 + 2 ( 2 1 ) 1 + 3 ( 2 1 ) 2 + ⋯
This is an arithmetic-geometric series .
k = 1 ∑ ∞ k r k − 1 = ( 1 − r ) 2 1
In this case, r = 2 1 , and so the infinite series evaluates
( 1 − 2 1 ) 2 1 = 4