Calculating a determinant. $D_n$=\begin{vmatrix}
a & 0 & 0 & \cdots  &0&0& n-1 \\
0 & a & 0 & \cdots &0&0& n-2\\
0 & 0 & a & \ddots &0&0& n-3 \\
\vdots & \vdots & \ddots & \ddots & \ddots&\vdots&\vdots \\
\vdots & \vdots & \vdots & \ddots & \ddots& 0&2 \\
0 & \cdots & \cdots & \cdots &0&a&1  \\
n-1 & n-2 & n-3 & \cdots & 2 & 1& a\\
\end{vmatrix}
I tried getting the eigenvalues for A =
\begin{vmatrix}
0 & 0 & 0 & \cdots  &0&0& n-1 \\
0 & 0 & 0 & \cdots &0&0& n-2\\
0 & 0 & 0  & \ddots &0&0& n-3 \\
\vdots & \vdots & \ddots & \ddots & \ddots&\vdots&\vdots \\
\vdots & \vdots & \vdots & \ddots & \ddots& 0&2 \\
0 & \cdots & \cdots & \cdots &0&0&1  \\
n-1 & n-2 & n-3 & \cdots & 2 & 1& 0\\
\end{vmatrix}
For $a=0$  , the rank of the matrix is $2$ , hence $\dim(\ker(A)) = n-2 $  
$m(0)>=n-2$
However, I was not able to determine the other eigenvalues.
Testing for different values of n :
for $n=2$ : 
$D_2 = a^2-1$
for $n=3$ :
$D_3 = a^3 -5a$
$D_n$ seems to be equal to $a^n - a^{n-2}\sum_{i=1}^{n-1}i^2$ .
However I'm aware that testing for different values of $n$ is not enough to generalize the formula.
Thanks in advance.
 A: Expand with respect to the first line: the term obtained with $a$ is $aD_{n-1}$. For the second one, we get $(-1)^{n+1}$ times a determinant that can be expanded with respect to the first column. This lead to the recurrence relation 
$$
D_n=aD_{n-1}-\left(n-1\right)^2a^{n-2}.
$$
Letting $b_n:=a^{-n}D_n$ for $a\neq 0$ allows to derive and easier recurrence relation whose resolution shows that the formula mentioned in the opening post, namely, 
$$
D_n=a^n - a^{n-2}\sum_{i=1}^{n-1}i^2,
$$
is correct.
A: Develop with respect to the first column. Then 
$$
\begin{aligned}
D_n &= aD_{n-1} -(n-1)\cdot (n-1)\cdot a^{n-2}
\\
&=aD_{n-1}-(n-1)^2a^{n-2}\ .
\end{aligned}
$$
This recursion, together with $D_1=a$ gives for $n\ge 2$ the solution
$$
D_n= (a^2-(1^2+2^2+\dots+(n-1)^2)a^{n-2}\ .
$$
(The sum in the first factor has a closed formula.)
A: You can just go for calculating the characteristic polynomial $\chi_{-A}$ of minus the matrix $A$ (the one at $a=0$), then your determinant will be $\chi_{-A}[a]$. As you already found that the rank of $A$ is$~2$ (if $n\geq2$; otherwise it is $0$) the coefficients of $\chi_{-A}$ in all degrees less than $n-2$ are zero (as its coefficient of degree $n-r$ is the sum of all principal $r$-minors of$~A$. Since $A$ has zero trace, one has $$\chi_{-A}=X^n+0x^{n-1}+c_nX^{n-1}$$ where $c_n$ is the sum of all principal $2$-minors of$~A$, which is easily seen to be
$$ c_n=-\sum_{k=0}^{n-1}k^2=-\frac{2n^3-3n^2+n}6.$$
Therefore $\det(D_n)=a^n+c_na^{n-2}=a^{n-2}(a^2+c_n)$, as you guessed (with $c_n\leq0$, so the roots of $\chi_{-A}$ are real: $\pm\sqrt{-c_n}$ and $0$ with multiplicity $n-2$).
A: To find other values of $x$ besides $0$ for which
$$
  \det \begin{bmatrix}
x & 0 & 0 & \cdots & n-1 \\
0 & x & 0 & \cdots & n-2 \\
0 & 0 & x & \cdots & n-3 \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
n-1 & n-2 & n-3 & \cdots & x
\end{bmatrix} = 0
$$
consider taking $\frac{n-1}{x}$ times the first row, plus $\frac{n-2}{x}$ times the second row, plus $\frac{n-3}{x}$ times the third, and so on, on the grounds that you will get a row vector which is equal to the last row in its first $n-1$ entries.
Its last entry is going to be $\frac{(n-1)^2 + (n-2)^2 + \dots + 2^2 + 1^2}{x} = \frac{n(n-1)(2n-1)}{6x}$. So if this happens to be equal to $x$, then the last row is a linear combination of the other rows, which means the determinant is $0$.
There are two values of $x$ for which this works: the two square roots of $\frac{n(n-1)(2n-1)}{6}$. This gives us the last two eigenvalues: the whole list is
$$
    a, a, \dots, a, a - \sqrt{\frac{n(n-1)(2n-1)}{6}}, a + \sqrt{\frac{n(n-1)(2n-1)}{6}}
$$
and their product is
$$
   a^{n-2}\left(a^2 - \frac{n(n-1)(2n-1)}{6}\right)
$$
as you conjectured.
A: It is maybe a bit easier to use the matrix determinant formula. If you rewrite your matrix as 
$$
M = aI +UV^T
$$
where $UV^T$ is
$$
\begin{bmatrix}
(n-1) &0\\
(n-2) &0\\
\vdots&0\\
1 &0\\
0&1
\end{bmatrix}
\begin{bmatrix}
0&0&\cdots&1\\
(n-1)&(n-2)&\cdots&0
\end{bmatrix}
$$
Then, from 
$$
\operatorname{det}({\mathbf{A}}+{\mathbf  {UV}}^{{\mathrm  {T}}})=\operatorname {det}({\mathbf{I}}+{\mathbf  {V}}^{{\mathrm  {T}}}{\mathbf  {A}}^{{-1}}{\mathbf  {U}})\operatorname {det}({\mathbf  {A}}).
$$
and $\mathbf{A}^{-1}=\frac1aI$, we have only a $2\times 2$ determinant to evaluate:
$$
\det(M) = \left|\begin{matrix}1&\frac{1}{a}\\\displaystyle\frac{1}{a}\sum_{i=1}^{n-1}i^2&1\end{matrix}\right|a^n = (1-\frac{1}{a^2}\sum_{i=1}^{n-1}i^2)a^n
$$
