let $A$ be an $n\times n$ matrix with entries $a_{ij}$ such that
$a_{ij}=2$ if $i=j$.
$a_{ij}=1$ if $|i-j|=2$
and $a_{ij}=0$ otherwise.
compute the determinant of $A$.
using the famous formula $\det A=\sum_{i=1}^{n}(-1)^{i+j}a_{ij}\det A^{(ij)}$ where $A{(ij)}$ is the submatrix obtaining from $A$ by omiting it's $i$th row and $j$th colomn, I reached to the formula $\det A=\frac{1}{4}n^2+n+\frac{7}{8}+\frac{1}{8}(-1)^n$. is it correct?