<s>[INST] Determinant problem $n\times n$ with $0$'s and $1$'s $$D_n=\left\vert\begin{matrix}0&1&0&0&\cdots&0&0\\
1&0&1&0&\cdots&0&0\\
0&1&0&1&\cdots&0&0\\
0&0&1&0&\cdots&0&0\\
\vdots&\vdots&\vdots&\vdots&\ddots&\vdots&\vdots\\
0&0&0&0&\cdots&0&1\\
0&0&0&0&\cdots&1&0\\
\end{matrix}\right\vert$$
Can anyone help me with this determinant? I tried to use Laplace and after that recursive formula but that didn't help.
 [/INST] If you calculate $D_n$ using Laplace's expansion along the first row twice, you get
$$D_n = (-1) \cdot \left\vert\begin{matrix}
1&1&0&\cdots&0&0\\
0&0&1&\cdots&0&0\\
0&1&0&\cdots&0&0\\
\vdots&\vdots&\vdots&\vdots&\ddots&\vdots&\\
0&0&0&\cdots&0&1\\
0&0&0&\cdots&1&0\\
\end{matrix}\right\vert = (-1) \cdot \left( 1 \cdot \left\vert\begin{matrix}
0&1&\cdots&0&0\\
1&0&\cdots&0&0\\
\vdots &\vdots&\vdots&\ddots&\vdots\\
0&0&\cdots&0&1\\
0&0&\cdots&1&0\\
\end{matrix}\right\vert \\ + (-1) \cdot 
\left\vert\begin{matrix}
0&1&\cdots&0&0\\
0&0&\cdots&0&0\\
\vdots&\vdots&\vdots&\ddots&\vdots& \\
0&0&\cdots&0&1\\
0&0&\cdots&1&0\\
\end{matrix}\right\vert \right) = -D_{n-2} $$
Thus, starting from $D_1 = 0$ and $D_2 = (-1)$ we get
$$ D_{2n} = (-1)^n, \,\,\, D_{2n+1} = 0. $$
</s>