My question is similar to How to compute the determinant of a tridiagonal matrix with constant diagonals? However, all of the options seem to include computations that are not permitted for integers. I am trying to find the determinant for a matrix in integers, more specifically, this matrix:
$X = \begin{bmatrix} 2 & -1 & 0 & 0 & \cdots & 0 & 0 \\ -1 & 2 & -1 & 0 & \ddots & 0 & 0 \\ 0 & -1 & 2 & -1 & \ddots & 0 & 0 \\ \vdots & \ddots & \ddots & \ddots & \ddots & \vdots & \vdots \\ 0 & 0 & 0 & \cdots & -1 & 2 & -1 \\ 0 & 0 & 0 & \cdots & 0 & -1 & 2 \\ \end{bmatrix} \in \mathbb{Z}^{n,n}$
Computing the determinant for smaller $n$ with the Rule of Sarrus gave me the suspicion that it is always $n + 1$, however, how do I show this for larger $n$ as well?