My question derives from reading a recent preprint (arXiv:1209.0827v1, in particular Section 4.1), but it can be phrased quite independently from that paper. The setup is as follows.

Let $A$ be the tridiagonal $n\times n$ matrix with $a_{ii} = -1$ on the main diagonal and $a_{i,i+1} = a_{i+1,i} = 2$ on the other two diagonals. We take the $n\times 1$ vector **1** (consisting of only 1's) as a right-hand side and look for the solution to the linear system of equations. It is not difficult to show that the determinant of the matrix is always an odd integer, the system has a unique solution for each $n$.

Question (asked by the authors).Are there infinitely many $n$ such that all entries of the solution vector are positive?

This would be interesting because each such $n$ gives rise to a solution with a particular property of a toy model for the energy transfer in a nonlinear Schrödinger equation.

Out of curiosity, I did a numerical search for solutions up to $n \sim 1000$ and got the following list of valid $n$ for which the solution is indeed nonnegative.

2, 3, 4, 8, 13, 18, 23, 42, 61, 80, 142, 204, 347, 490, 633, 776, 919, ...

I noticed the following for the sequence of consecutive differences, which starts with

1, 1, 4, 5, 5, 5, 19, 19, 19, 62, 62, 143, 143, 143, 143, 143...

**Observation.** This sequence seems to have the property that each entry is either the previous entry **or** it is the previous entry multiplied by the number of times the previous entry has appeared in the sequence in total (4 has appeared once, 5 has appeared three times) *plus* the biggest element that is strictly smaller. We do see that indeed $19 = 3\cdot5+4$, $62 = 3\cdot19+5$ and $143 = 2\cdot62+19$. *Furthermore*, each element bigger than 1 in the sequence of differences seems to be one larger than an element in the sequence of valid $n$.

One can now use the rule to create much larger matrices and check whether they have the property and this seems to work just fine, though I am not sure up to which size Mathematica as used by a numerical layman is trustworthy.

My question.Does the sequence of differences really observe this rule? Assuming it does, does it create all $n$ with the desired property? What decides whether the next term in the sequence of differences is identical to its predecessor or the sum of previous terms?

I am fairly confident that all of this is well-known (there seems to be a sort of construction algorithm behind it) and would be thankful for any references.