I'm trying to analytically find the inverse of the following $N \times N$ tridiagonal matrix:
$$T = \begin{bmatrix} 1 & -c \\ -c & 2 & -c \\ & -c & 2 & \ddots \\ & & \ddots & \ddots & \ddots \\ & & & \ddots & 2 & -c \\ & & & & -c & 2 & -c \\ & & & & & -c & 1 \end{bmatrix}$$
That is, all elements just off the main diagonal are $-c$, where $c \in (0, 1)$; the main diagonal has a one in the top-left and in the bottom-right, and twos in between; and everything else is a zero.
This comes from a statistical model I'm using (a CAR spatial model for a path graph) where, by construction, $T^{-1}$ is a covariance matrix. Thus I know $T^{-1}$ is symmetric and the elements of its main diagonal are all positive. I'd happily settle for only getting formulas for those main diagonal elements.
Copying from the Wikipedia page on tridiagonal matrices (and doing a little bit of work), the $i$th diagonal element of $T^{-1}$ is $(T^{-1})_{ii} = \theta_{i-1} \theta_{N-i} / \theta_N$, where
$$\theta_i = a_i \theta_{i-1} - c^2 \theta_{i-2} \text{ for } i = 2,3,\dots,N$$
with initial conditions $\theta_0 = \theta_1 = 1$. The $a_i$ are the main diagonal elements of $T$, so e.g. if $N = 5$ then $\{a_i\} = \{1,2,2,2,1\}$. One way to answer my question would be to solve the above recurrence relation, i.e. find a closed-form for $\theta_i$ for any $N \ge 2$. (I tried this using a generating function, but got stuck due to the pesky non-constant diagonal of $T$, i.e. the $a_i$.)
In the following related question, the person who answered it used a very different, very involved approach: Inverse of a symmetric tridiagonal matrix.. There, the matrix to be inverted had a constant main diagonal, so it was easier.