In a certain tribe, you have a certain amount of tribal offerings, at the start of year 1. However, at the start of each year (including this one), you must feed the black hole with a number of tribal offerings equal to the size of the black hole. On year 1, the black hole starts as size 1 and doubles each year that you pay the tribal offerings. (If it was 4, it's 8 now.) If you can't pay this cost, the island will explode in the middle of this year.
However, your workers are very industrious with investing, and always manage to double the number of tribal offerings that you had at the beginning of the year after paying the black hole.
For example, if you started with 4 offerings: (B = beginning of year before feeding the black hole, A = after you fed the black hole, E = end of year after your tribal offerings have doubled)
BAE
14 3 6
26 4 8
38 4 8
48 0 0
50
Since there wasn't enough to pay 16 tribal offerings, the island lasted 5 years.
How would you find the number of turns this island would last if you started with x tribal offerings?
Suppose you start with x offerings. After paying 1 offering in year 1, you have x1. At the beginning of year 2, you will have 2(x1)=2x2 offerings. After paying 2 offerings, you will have 2(x2)=2x4. At the beginning of year 3, you will have 4(x2)=4x8 offerings. After paying 4 offerings, you will have 4(x3)=4x12. Basically, at the beginning of year y, you will have (2^(y1))(x(y1))=(2^(y1))x(2^(y1))y+(2^(y1)) offerings. After paying 2^(y1) offerings, you will have (2^(y1))(xy)=(2^(y1))x(2^(y1))y. When xy=0, you will have 0 offerings. This happens when x=y. Therefore, at the end of year x, you will have 0 offerings. Then, the island will explode in year x+1.

Posted by Math Man
on 20151006 15:42:20 