We can simply calculate the determinant of an opposite (lower) triangular matrix:
Let $J_n$ be the $n \times n$ matrix with $1$ on the anti-diagonal and $0$ otherwise (i.e. $J_ne_i = e_{n+1-i}$ for all $1 \leq i \leq n$, where $e_1, \dotsc, e_n$ denotes the standard basis). Given any $m \times n$-matrix $A$ the matrix $AJ_n$ originates from $A$ by vertically mirroring its colums from the middle, i.e. swapping the first column with the last, the second with the second last, etc.
If $A$ is an $n \times n$ square matrix then we get from $J_n^2 = I_n$ that
$$
\det(A) = \det(J_n) \det(AJ_n).
$$
In the case of $D_n$ we get that $D_n J_n$ is the $a_n$-scalar multiple a lower triangular matrix with diagonal entries $x-a_1, x-a_2, \dotsc, x-a_{n-1}, 1$, so
$$
\det(D_n)
= \det(J_n) \det(D_n J_n)
= \det(J_n) a_n (x-a_1) \dotsm (x-a_{n-1}).
$$
So the only difference is that we need to know $\det(J_n)$. Because $J_n$ is a permutation matrix, corresponding to $\sigma_n \in S_n$ with $\sigma(i) = n+1-i$, we have $\det(J_n) = \mathrm{sgn}(\sigma_n)$. Notice that
\begin{align*}
\sigma_{2n} &= (1 \;\; 2n) (2 \;\; n-1) \dotsm (n \;\; n+1) \\
\sigma_{2n+1} &= (1 \;\; 2n+1) (2 \;\; n-1) \dotsm (n \;\; n+2).
\end{align*}
So we can just count the number of transpositions used and get that
$$
\mathrm{sgn}(\sigma_n) =
\begin{cases}
\phantom{-}1 & \text{if $n \equiv 0,1 \bmod 4$}, \\
-1 & \text{if $n \equiv 2,3 \bmod 4$},
\end{cases}
= (-1)^{n(n-1)/2}.
$$
So alltogether we have
$$
\det(D_n) = (-1)^{n(n-1)/2} a_n (x-a_1) \dotsm (x-a_{n-1}).
$$
(The nice thing about this is that now that we have calculated $\det(J_n) = (-1)^{n(n-1)/2}$ we can use this to calculate the determinant of opposite triangular and opposite diagonal matrices more ore less in the usual way.)
By linearity in or Laplace expansion along the first column, the determinant is equal to
$$
\begin{vmatrix}
-1&1&\cdots & 1 \\
-a_1&a_2&\cdots &a_n\\
-a_1^{2}&a_2^{2}&\cdots&a_n^{2}\\
\vdots&\vdots&\ddots& \vdots\\
-a_1^{n-1}&a_2^{n-1}&\cdots&a_n^{n-1}\\
\end{vmatrix}
+
2\begin{vmatrix}
a_2&\cdots &a_n\\
a_2^{2}&\cdots&a_n^{2}\\
\vdots&\ddots& \vdots\\
a_2^{n-1}&\cdots&a_n^{n-1}\\
\end{vmatrix}.
$$
Now each of the two summands is a multiple of a Vandermonde determinant.
Best Answer
Transform the matrix by the (determinant invariant) operation of adding $-a_i$ times the $(i+1)$th row on the first row. This gets us \begin{vmatrix} -\sum_i \frac{1}{a_i} & 0 & 0 & \ldots & 0 \\ 1 & a_1 & 0 & \ldots & 0 \\ 1 & 0 & a_2 & \ldots & 0 \\ \vdots & \vdots& &\ddots& \vdots\\ 1 & 0 & 0 & \ldots & a_n \\ \end{vmatrix} Then you have a lower triangle matrix whose determinant is just the product of the diagonal elements.