Prove that matrices of this form have eigenvalues $0,1,\ldots , n-1$

Fix arbitrary real numbers $x_1,\ldots ,x_n$ which are pairwise distinct, i.e. so that $x_i \neq x_j$ for any pair $i \neq j$. Let $A = (a_{ij})$ be the following $n \times n$ matrix: Its diagonal entries are given by the equation,

$$a_{ii}=\sum_{j\neq i}\frac{x_i}{x_i-x_j},$$

while its off-diagonal entries given by the equation,

$$a_{ij}=\frac{x_i}{x_i-x_j}$$,

for $i\neq j$. For instance when n=2, the matrix looks like:

$$A=\begin{pmatrix} \frac{x_1}{x_1-x_2} & \frac{x_1}{x_1-x_2}\\ \frac{x_2}{x_2-x_1} & \frac{x_2}{x_2-x_1} \end{pmatrix}$$

Prove that the set of eigenvalues for the matrix A is of the form $\left \{0,1,\ldots,n-1\right \}$.

I'm completely lost as to how to continue. I've tried to work on the determinant of $A-\lambda I$ for $2 \times 2$ and $3 \times 3$ matrices $A$ but I haven't managed to find anything helpful towards the proof.

Update 1

I'm not entirely sure how to write this formula nicely as a mathematical expression, but as code in python I have that the $k$th element of $v_0$ is

        p = product([L[i-1] - L[j-1] for i in [1..n] for j in [i+1..n] if i != k and j != k])
        v[k-1] = p if k % 2 == 1 else -p

where L refers to the list [x_1,...,x_n], and I want for $1 \leq i < j \leq n$ and for $i \neq j \neq k$

I also have that $v_i$ is equal to $diag(x_1,...,x_n)^{i}v_0$

Update 2

the eigenvectors for the case where $n=4$ are, $$ v_0 = \begin{pmatrix} 1\\ -\frac{x_1^2 - x_1x_3 - (x_1 - x_3)x_4}{x_2^2 - x_2x_3 - (x_2 - x_3)x_4}\\ \frac{x_1^2 - x_1x_2 - (x_1 - x_2)x_4}{x_2x_3 - x_3^2 - (x_2 - x_3)x_4}\\ -\frac{x_1^2 - x_1x_2 - (x_1 - x_2)x_3}{x_2x_3 - (x_2 + x_3)x_4 + x_4^2} \end{pmatrix},$$

$$v_1 = \begin{pmatrix} 1\\ -\frac{x_1^2x_2 - x_1x_2x_3 - (x_1x_2 - x_2x_3)*x_4}{x_1x_2^2 - x_1x_2x_3 - (x_1x_2 - x_1x_3)x_4}\\ -\frac{(x_1 - x_2)x_3x_4 - (x_1^2 - x_1x_2)x_3}{x_1x_2x_3 - x_1x_3^2 - (x_1x_2 - x_1x_3)x_4}\\ -\frac{(x_1^2 - x_1x_2 - (x_1 - x_2)x_3)x_4}{x_1x_2x_3 + x_1x_4^2 - (x_1x_2 + x_1x_3)x_4} \end{pmatrix},$$

$$v_2 = \begin{pmatrix} 1\\ -\frac{x_1^2x_2^2 - x_1x_2^2x_3 - (x_1x_2^2 - x_2^2x_3)x_4}{x_1^2x_2^2 - x_1^2x_2x_3 - (x_1^2x_2 - x_1^2x_3)x_4}\\ -\frac{(x_1 - x_2)x_3^2x_4 - (x_1^2 - x_1x_2)x_3^2}{x_1^2x_2x_3 - x_1^2x_3^2 - (x_1^2x_2 - x_1^2x_3)x_4}\\ -\frac{x_1^2 - x_1x_2 - (x_1 - x_2)x_3)x_4^2}{x_1^2x_2x_3 + x_1^2x_4^2 - (x_1^2x_2 + x_1^2x_3)x_4} \end{pmatrix}, $$

$$v_3 = \begin{pmatrix} 1\\ -\frac{x_1^2x_2^3 - x_1x_2^3x_3 - (x_1x_2^3 - x_2^3x_3)x_4}{x_1^3x_2^2 - x_1^3x_2x_3 - (x_1^3x_2 - x_1^3x_3)x_4}\\ -\frac{(x_1 - x_2)x_3^3x_4 - (x_1^2 - x_1x_2)x_3^3}{x_1^3x_2x_3 - x_1^3x_3^2 - (x_1^3x_2 - x_1^3x_3)x_4}\\ -\frac{x_1^2 - x_1x_2 - (x_1 - x_2)x_3)x_4^3}{x_1^3x_2x_3 + x_1^3x_4^2 - (x_1^3x_2 + x_1^3x_3)x_4} \end{pmatrix}$$

Update 3

I managed to work out a formula for the $j$th element of the eigenvector with $eigenvalue=\lambda$ and $size=n$,

$$(-1)^{j+1}\frac{x_j^\lambda}{x_1^\lambda} \prod_{k\neq 1,k\neq j}^n \frac{x_1-x_k}{x_j-x_k} $$

I'm just not sure now as to how to use the formula for one entry of an eigenvector to prove the set of eigenvalues


For $ k = 0, 1, \ldots, n-1$, consider the (horizontal) vector $v_k$ with $i$th coordinate $$ \sum \prod_{j=1, a_j \neq i}^{k} {x_{a_j}}.$$

For example, with $n = 3$, we have
$v_0 = (1, 1, 1)$,
$v_1 = (x_2 + x_3, x_3 + x_1, x_1 + x_2)$,
$v_2 = ( x_2x_3, x_3x_1, x_1x_2)$.

With $n = 4$, we have
$v_0 = (1, 1, 1, 1)$,
$v_1 = (x_2 + x_3 + x_4, x_3 + x_4 + x_1, x_4 + x_1 + x_2, x_1 + x_2 + x_3)$,
$v_2 = ( x_2x_3+x_3x_4+x_4x_2, x_3x_4+x_4x_1+x_1x_3, x_4x_1+x_1x_2+x_2x_4, x_1x_2 + x_2x_3 + x_3x_2)$,
$v_3 = (x_2x_3x_4, x_3x_4x_1, x_4x_1x_2, x_1x_2x_3)$.

Claim: $v_kA = (n-1-k) v_k$.

Proof: Expand it. A lot of the cross terms cancel out.
For example, with $v_0$, the column sum is $n-1$, so $v_0 A = (n-1) v_0$.
For example, with $v_{k-1}$, the numerators are all $\prod x_i$, and by looking at the denomninators, they cancel out to 0, so $v_{k-1} A = 0 $.

Do you see how we get $v_k A = (n-1-k)v_k$?

Corollary: The eigenvalues are $0, 1, 2, \ldots, n-1 $.