<s>[INST] $n^{th}$ determinant Find determinant $D_n$ of matrix $$
        \begin{bmatrix}
        1 & 1 & \cdots & 1 & -n \\
        1 & 1 & \cdots & -n & 1 \\
        \vdots & \vdots & \ddots & \vdots & \vdots \\
        1 & -n & \cdots & 1 & 1 \\
        -n & 1 & \cdots & 1 & 1
        \end{bmatrix}
$$
After multiplying first row by $-1$ and adding to $n-1$ rows:
$$
        \begin{vmatrix}
        1 & 1 & \cdots & 1 & -n \\
        0 & 0 & \cdots & -n-1 & n+1 \\
        \vdots & \vdots & \ddots & \vdots & \vdots \\
        0 & -n-1 & \cdots & 0 & n+1 \\
        -n & 1 & \cdots & 1 & 1
        \end{vmatrix}
$$
Second and $n-1$ row are changing place:
$$
        \begin{vmatrix}
        1 & 1 & \cdots & 1 & -n \\
        0 & -n-1 & \cdots & 0 & n+1 \\
        \vdots & \vdots & \ddots & \vdots & \vdots \\
        0 & 0 & \cdots & -n-1 & n+1 \\
        -n & 1 & \cdots & 1 & 1
        \end{vmatrix}
$$
Multiplying first row by $n$ and adding it to $n$-th row:
$$
        \begin{vmatrix}
        1 & 1 & \cdots & 1 & -n \\
        0 & -n-1 & \cdots & 0 & n+1 \\
        \vdots & \vdots & \ddots & \vdots & \vdots \\
        0 & 0 & \cdots & -n-1 & n+1 \\
        0 & n+1 & \cdots & n+1 & 1-n^2
        \end{vmatrix}
$$
Adding second to $n$-th row:
$$
        \begin{vmatrix}
        1 & 1 & \cdots & 1 & -n \\
        0 & -n-1 & \cdots & 0 & n+1 \\
        \vdots & \vdots & \ddots & \vdots & \vdots \\
        0 & 0 & \cdots & -n-1 & n+1 \\
        0 & 0 & \cdots & n+1 & (1+n)(2-n)
        \end{vmatrix}
$$
Adding $n-1$ to $n$-th row:
$$
        \begin{vmatrix}
        1 & 1 & \cdots & 1 & -n \\
        0 & -n-1 & \cdots & 0 & n+1 \\
        \vdots & \vdots & \ddots & \vdots & \vdots \\
        0 & 0 & \cdots & -n-1 & n+1 \\
        0 & 0 & \cdots & 0 & (1+n)(3-n)
        \end{vmatrix}
$$
Product on main diagonal gives $$D_n=(n+1)(3-n)(-n-1)^{n-2}$$
This is not correct. What is wrong with this upper triangular transformation?
 [/INST] Let $D_m$ be the determinant of the $m\times m$ matrix like this with $-n$ in the antidiagonal and $1$ everywhere else. You are seeking $D_n$.
Note for $k\leq n$, we can find a relation on $D_k$ as follows. Multiply the top row by $n-k+2$, thus scaling the determinant by $n-k+2$.
Then add rows $2$ through $k$ to the first row, which leaves the determinant unchanged, and you have a top row that is mostly $0$ except $-n(n-k+2)+k-1$ in the last entry.
Compute the determinant $D_n$ by expanding across this top row, and you have that $$\begin{align}
D_n&=(-1)^n(-n(n-n+2)+n-1)D_{n-1}/(n-n+2)\\
&=(-1)^n(-n-1)D_{n-1}/2\\
&=(-1)^n(-n-1)(-1)^{n-1}(-n(n-(n-1)+2)+n-1-1)D_{n-2}/[2(n-(n-1)+2)]\\
&=(-1)^{n+(n-1)}(-n-1)(-2n-2)D_{n-2}/[2(3)]\\
&=(-1)^{n+(n-1)}(-n-1)(-2n-2)(-1)^{n-2}(-n(n-(n-2)+2)+n-2-1)D_{n-3}/[2(3)(n-(n-2)+2)]\\
&=(-1)^{n+(n-1)+(n-2)}(-n-1)(-2n-2)(-3n-3)D_{n-3}/[2(3)(4)]\\
&\cdots\\
&=(-1)^{n+(n-1)+\cdots+2}(-n-1)(-2n-2)\cdots(-(n-1)n-(n-1))D_{1}/n!\\
&=(-1)^{n(n+1)/2-1}(n+1)(2n+2)\cdots((n-1)n+(n-1))(-n)/n!\\
&=(-1)^{n(n+1)/2}(n+1)^{n-1}(n-1)!(n)/n!\\
&=(-1)^{n(n+1)/2}(n+1)^{n-1}\\
\end{align}$$
</s>