I have this determinant which looks like a Vandermonde matrix
$$D=\begin{vmatrix}1& a_1 & \cdots & a_1^{n-2}& a_1^n\\ 1& a_2 & \cdots & a_2^{n-2}& a_2^n\\ \vdots &\vdots & \ddots & \vdots & \vdots\\ 1& a_n & \cdots & a_n^{n-2}& a_n^n \end{vmatrix}$$
Using the software maxima I found that probably $D$ has this form
$$D= \prod_{i<j}(a_j-a_i)(a_1+a_2+\cdots+ a_n)$$ but I couldn't prove it. Is my conjecture true and how can I prove it?
Hint:
Consider $$D = \begin{vmatrix} 1&x&x^2&\cdots&x^{n-2} & x^{n-1}&x^n\\ 1&a_1&a_1^2&\cdots&a_1^{n-2} & a_1^{n-1}&a_1^n\\ 1&a_2&a_2^2&\cdots&a_2^{n-2} & a_2^{n-1}&a_2^n\\ \vdots\\ 1&a_n&a_n^2&\cdots&a_n^{n-2} & a_n^{n-1}&a_n^n\\ \end{vmatrix}$$
This is a Vandermonde determinant, so you already know how to calculate it. Look for the coefficient of $x^{n-1}$. On the other hand develop the determinant using the first row.
In a similar way, you can see the following generalization: $$\begin{vmatrix} 1&a_1&\cdots&a_1^{k-1}&a_1^{k+1}\cdots &a_1^n\\ 1&a_2&\cdots&a_2^{k-1}&a_2^{k+1}\cdots &a_2^n\\ \vdots\\ 1&a_n&\cdots&a_n^{k-1}&a_n^{k+1}\cdots &a_n^n\\ \end{vmatrix} = \sigma_{n-k}(a_1,a_2\cdots,a_n)\prod_{i<j}(a_j-a_i)$$
(Here $\sigma_k$ denotes the $k$-th elementary symmetric polynomial)