Linear dependency of real numbers with integer coefficients adding up to zero Let $x = (x_1, \dots, x_n)$ be a vector of real number. I was asking myself if there was an efficient way of telling whether there exists a non-zero vector of integers $z \in \mathbb Z$ such that both
$$ \sum_{i=1}^n z_i = 0$$
and
$$ \sum_{i=1}^n z_i x_i = 0. $$
Is there furthermore some (mild!) condition that one can place on $x$ such that no such vector $z$ exists?
 A: Given your fixed vector $x \in \mathbb{R}^n$ consider these conditions on a rational vector $q \in \mathbb{Q}^n.$ (scaling will give the integer case.)
$ 1. \sum_{i=1}^n q_i = 0$
and
$ 2. \sum_{i=1}^n q_i x_i = 0. $
The first condition alone determines a subspace $\mathbf{V}$ of dimension $n-1$ in $\mathbb{Q}^n.$
The second condition alone determines some subspace of $ \mathbf{W} \subset \mathbb{Q}^n.$
The question is when their intersection is other than trivial subspace $\mathbf{0}.$
Two conditions which say the intersection is trivial are


*

*$\mathbf{W}=\mathbf{0}$ i.e. the $x_i$ are rationally independent. For example: 


*

*$(1,\pi,\pi^2,\cdots,\pi^{n-1})$ or 

*$(\sqrt{p_1},\sqrt{p_2},\cdots,\sqrt{p_n})$ where the $p_i$ are distinct primes or at least pairwise co-prime integers.


*$\mathbf{W}$ is spanned by a single vector not in $\mathbf{V}.$  For example:  


*

*$(1,r,r^2,\cdots,r^{n-1})$ where $r=\sqrt[n-1]{2}$ or some other root $r \ne 1$ of an irreducible integer polynomial of degree $n-1.$  More generally,

*$(x_1,\cdots,x_{n-1})$ rationally independent and $x_n=0$ or indeed any value $x_n=\sum_1^{n-1}c_ix_i$ such that $c_i \in \mathbb{Q}$ and $\sum_1^{n-1}c_i \ne 1.$



However, if $\mathbf{W}$ has dimension at least two then the intersection must be non-trivial.   Specifically, if there are two vectors $q',q''$ , neither a multiple of the other, which satisfy condition 2), then we can find integers $c',c''$ such that $z=c'q'+c''q''$ is an integer vector satisfying both conditions. 
Special cases where we can tell that this does happen include 


*

*one of the $x_i=0$ (and the rest are rationally dependent)

*two of $x_i$ are equal and the set of values (without repeats) is dependent.

