Solving generalized determinant related How to solve following determinant by applying suitable elementary row/column transformations to obtain characteristic polynomial?
\begin{align*}
 \left\vert
\begin{matrix}
-\lambda  & 0 & 1 & 0 & 0 & \cdots & 0\\
0 & -\lambda & 0 & 1 & 1 &\cdots & 1\\
1 & 0 & -\lambda & 1 & 1 &\cdots & 1\\
0 & 1 & 1 & -\lambda & 0 &\cdots & 0\\
0 & 1 & 1 & 0 & -\lambda &\cdots & 0\\
\vdots & \vdots & \vdots & \vdots& \vdots &\ddots & \vdots \\
 0 & 1 & 1 & 0 & 0 &\cdots &  -\lambda 
\end{matrix}
\right\vert_{n+3} & =0 \\
\end{align*}
 A: Add $\frac1\lambda$ of all except the first three rows to the second and third rows to get rid of the columns of $1$s. That leaves $(-\lambda)^n$ from the diagonal times
$$
\begin{vmatrix}
-\lambda&0&1\\
0&-\lambda+\frac n\lambda&\frac n\lambda\\
1&\frac n\lambda&-\lambda+\frac n\lambda
\end{vmatrix}
=-\lambda\left(-\lambda+\frac n\lambda\right)^2+\lambda-\frac n\lambda+\frac{n^2}\lambda=-\lambda^3+2n\lambda+\lambda-\frac n\lambda\;,
$$
so the overall determinant is
$$
(-\lambda)^{n+3}-(2n+1)(-\lambda)^{n+1}+n(-\lambda)^{n-1}\;.
$$
A: @joriki's proof considered the case $\lambda\ne 0$.
Now, for the case that $\lambda=0$, we have
\begin{align}
 \left\vert
\begin{matrix}
0  & 0 & 1 \\
0 & 0 & 0 \\
1 & 0 & 0 
\end{matrix}
\right\vert=0\quad\mbox{and}\quad
 \left\vert
\begin{matrix}
0  & 0 & 1 &0\\
0 & 0 & 0 &1\\
1 & 0 & 0 &1\\
0 & 1& 1 & 0
\end{matrix}
\right\vert=
 \left\vert
\begin{matrix}
0 & 0 & 1 \\
1 & 0 & 1 \\
0 & 1&  0
\end{matrix}
\right\vert=1,
\end{align}
and for $n\geq 2$,
\begin{align}
 \left\vert
\begin{matrix}
0  & 0 & 1 & 0 & 0 & \cdots & 0\\
0 & 0 & 0 & 1 & 1 &\cdots & 1\\
1 & 0 & 0 & 1 & 1 &\cdots & 1\\
0 & 1 & 1 & 0 & 0 &\cdots & 0\\
0 & 1 & 1 & 0 & 0 &\cdots & 0\\
\vdots & \vdots & \vdots & \vdots& \vdots &\ddots & \vdots \\
 0 & 1 & 1 & 0 & 0 &\cdots &  0
\end{matrix}
\right\vert_{n+3}=0
\end{align}
because the last $n$ columns are identical.
