A finite integer sequence starts with and satisfies . The last item is the only negative number in the sequence.
Find the value of that maximizes the length of the sequence .
Bonus: Take a look at the ratio . Can you see where the value came from?
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.
Nothing novel in the solution; let x = a 1 , express the first give or take 10 items with x and evaluate the condition for them to be positive.
You could also write a small code if you wanted to be clear. 1 2 4 1 , . . . , 1 2 5 0 for a 1 will give l = 7 , 9 , 9 , 9 , 9 , 9 , 1 1 , 1 0 , 1 0 , 8 , showing 1 2 4 7 is the answer.
However, there is a shorter way. To keep the sequence going as long as possible, we want to minimize the fluctuation of the ratio α between two adjacent items (larger item over the other); i.e., if a n > a n + 1 then a n = α × a n + 1 . Now we have α ( α − 1 ) = 1 , which is the famous equation for the golden ratio α = 2 1 + 5 . One can therefore shortcut to the answer by a 1 = α a 0 = 2 1 + 5 2 0 1 8 = 1 2 4 7 . 1 9 2 5 8 9 ≃ 1 2 4 7 (and checking cases 1246 and 1248 to ensure the answer).