Let $\epsilon\_1,\ldots,\epsilon\_n$ be a sequence of signs and $M(t)$ be the tridiagonal matrix whose diagonal entries are $\epsilon\_1 t,\ldots, \epsilon\_n t$ and off-diagonal entries equal to $1$. Is it true that the number of real zeroes of $P(t)=\det M(t)$ is equal to the absolute value of $\epsilon\_1+\dots+\epsilon\_n$?


I checked this numerically on various cases, tried to apply the Sturm algorithm but couldn't prove it. Thanks for any help!



Real zeroes of the determinant of a tridiagonal matrix
For $\epsilon\_1=\epsilon\_2=-1$ and $\epsilon\_3=\epsilon\_4=\epsilon\_5=1$ you get the counterexample $\operatorname{det}M(t)=t(t - 1)^2(t + 1)^2$.


Another example, with simple real roots, is $\epsilon\_1=\epsilon\_5=-1$ and $\epsilon\_2=\epsilon\_3=\epsilon\_4=1$ with $\operatorname{det}M(t)=(t - 1)t(t + 1)(t^2 + 1)$.


