BMO2 2025/2026 (Problem 4)

Let NN be a positive integer and let (kn)n≥1(k_n)_{n\ge1} be a sequence of positive integers with all terms at most NN. Annabel begins by choosing integers x1,x2,…,xNx_1,x_2,\ldots,x_N. She then extends this to an infinite sequence (xn)n≥1(x_n)_{n\ge1} of integers by defining
xn=∑i=n−knn−1xix_n=\sum_{i=n-k_n}^{n-1}x_i
for each n>Nn>N.
Show that there are either finitely many strictly positive terms or finitely many strictly negative terms in the infinite sequence (xn)(x_n).