Let for $n\geq 3, C_n$ denote the $(2n) \times (2n)$ matrix such that all entries along the diagonal are $2$, all entries along the sub- and super-diagonal are $1$, all entries along the antidiagonal are $1$, all entries along the diagonals directly above and below the antidiagonal are $2$, and all other entries are zero.
Let $f(n) : \mathbb{N}\to\mathbb{N}, f(n) = \det(C_n)$ for $n\geq 3.$ Prove that $$f(n) = \begin{cases}0,&\text{if }n = 3k+2,\ k\in\mathbb{N}\\ 3^n,& \text{otherwise}\end{cases}.$$
I'm not sure how to go about doing this. I tried cofactor expansion along the first column, but I couldn't make much progress. I can't seem to find a recursive relationship. So I just tried converting $C_n$ to an upper triangular matrix using row operations. This results in a matrix satisfying certain patterns, but I can't seem to find a way to prove why reducing the matrix always produces these patterns (I can prove that the $k$th diagonal entry of the resulting upper triangular matrix is $\frac{k+1}k,$ where $1\leq k\leq n$ but I can't deal with the other $n$ diagonal entries well).