cinelli wrote:An eccentric millionaire decided to open a bank account. She deposited x whole pounds. On day 2 she deposited y whole pounds. On day 3 she deposited x+y pounds. On subsequent days the amount added to the account was the sum of the previous two days’ deposits. On day 20 she deposited one million pounds. What are x and y?
Wrote out my solution before looking at others. It's essentially jfgw's, but with a further step added to reduce the brute force from checking out 30 possibilities to just 2. Spoiler...
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
On day 1, she deposited 1*£x + 0*£y.
On day 2, she deposited 0*£x + 1*£y.
On day 3, she deposited 1*£x + 1*£y.
On day 4, she deposited 1*£x + 2*£y.
On day 5, she deposited 2*£x + 3*£y.
On day 6, she deposited 3*£x + 5*£y.
And so on.
Looking down the columns of coefficients, it doesn't take long to see that the well-known Fibonacci numbers are involved here and little longer to prove that, if we define them by F(0)=0, F(1)=1, F(n)=F(n-2)+F(n-1) for n>=2, then for N>=2:
On day N, she deposited F(N-2)*£x + F(N-1)*£y.
So we know that F(18)*£x + F(19)*£y = £1,000,000, with x and y positive whole numbers. Calculating the values of F(0), F(1), ..., F(19), or cheating by looking them up on
https://oeis.org/A000045, they are:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181
So 2584x + 4181y = 1000000.
Since 2584x and 1000000 are both multiples of 8, 4181y must be one as well, which means it must be a multiple of 8*4181 = 33448, the least common multiple of 8 and 4181. There are only 30 multiples of 33448 under 1000000, which is a manageable number of possibilities to check out, but that would be a bit tedious... To reduce that tedium, also note that 2584x is a multiple of 17 and 1000000 has remainder 9 when divided by 17, so 4181y must be a multiple of 33448 and have remainder 9 when divided by 17. As it happens, 33448 also has remainder 9 when divided by 17, so 4181y might be 33448.
If another multiple 33448n of 33448 has the same remainder when divided by 17, then 33448n - 33448 = 33448(n-1) is a multiple of 17, and since 17 is prime and does not divide 33448, that means that n-1 must be a multiple of 17. So the next conceivably possible multiple of 33448 is 33448*18 = 602064, and then the next one after that is 33448*35 = 1170680, which is too big. So 4181y is either 33448 (y=8) or 602064 (y=144).
Then 2584x is 966552 or 397936 respectively, which makes x= 374.0526... or 154 respectively. Since x is a whole number, that means the only solution is x=154, y=144.
Gengulphus