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!