A sequence { S } is defined such that S 1 = 2 0 1 8 , S 2 is a positive integer and for n ≥ 3 , S n = S n − 2 − S n − 1 . The sequence ends when a term that is not a positive integer appears (this term is kept in the sequence).
What is the maximum possible number of terms in such a sequence?
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.
The number of terms is maximised when S 2 S 1 is as close to the golden ratio ϕ as possible. In this case it is when S 2 = 1 2 4 7 .
Then the sequence would go 2 0 1 8 , 1 2 4 7 , 7 7 1 , 4 7 6 , 2 9 5 , 1 8 1 , 1 1 4 , 6 7 , 4 7 , 2 0 , 2 7 , − 7 which is 1 2 terms.
Problem Loading...
Note Loading...
Set Loading...
It is a simple induction that (here F n is the n th Fibonacci number) S n = ( − 1 ) n [ F n − 1 S 2 − 2 0 1 8 F n − 2 ] n ≥ 2 and so the term S n will be non-negative provided that S 2 ≤ 2 0 1 8 F n − 1 F n − 2 when n is odd and provided that S 2 ≥ 2 0 1 8 F n − 1 F n − 2 when n ≥ 2 is even. The sequence 2 0 1 8 F n − 1 F n − 2 is increasing for odd n and decreasing for even n .
Since 2 0 1 8 F n − 1 F n − 2 is equal to 1 2 4 6 . 4 1 , 1 2 4 7 . 4 9 , 1 2 4 7 . 0 8 when n = 1 0 , 1 1 , 1 2 , we see that it is possible to have S 1 , S 2 , . . . , S 1 1 all nonegative, by choosing S 2 = 1 2 4 7 , but that after that S 1 2 is negative. Any other value of S 2 yields a negative term in the sequence before S 1 2 . Thus the answer is 1 2 .