irrationality of numbers with rational sum Assume that $x_1, \dots, x_n$ are non-negative real numbers such that 
$$
x_1 + \dots + x_n \in \mathbb Q~~~~~~~~~~~~~~ \text{ and } ~~~~~~~~~~~~~~~x_1 + 2x_2 + \dots + nx_n\in \mathbb Q.
$$
Does this imply that the numbers $x_1,\dots, x_n$ are rational too?
 A: Counterexample:
$$x_1=\sqrt2$$
$$x_2=10-2\sqrt 2$$
$$x_3=\sqrt 2$$
$$x_1+x_2+x_3=10\in Q$$
$$x_1+2x_2+3x_3=\sqrt 2+20-4\sqrt 2+3\sqrt 2=20\in Q$$
A: What is true is that if $\sum_{j=1}^n j^k x_j$ is rational for $k = 0,1,\ldots,n-1$, then the $x_j$ are rational.  That is becaue the $n \times n$ Vandermonde matrix with entries $j^k$ is invertible, and its inverse has rational entries.  But if you impose fewer than $n$ conditions $\sum_j a_{ij} x_j$ rational, you have a coefficient matrix with fewer rows than columns, and this will have a nontrivial null space.  You can add to any solution a vector in the null space (which can have all its nonzero entries irrational) without changing any of the sums.    
A: Not in general, no.  Subtracting the first equation from the second gives
$$
x_2 + 2x_3 + \cdots + (n-1)x_n \in \mathbb{Q},
$$
and subtracting this from the first again gives
$$
x_1 - x_3 - 2x_4 - \cdots - (n-2)x_n \in \mathbb{Q}.
$$
So if $n=1$ or $n=2$, then $x_1,\ldots,x_n$ are rational.  Otherwise they need not be.  For instance, let $x_1=1+\pi$, $x_2=10-2\pi$, and $x_3=\pi$ (and $x_n=0$ for $n\ge 4$).
A: If $n \leq 2$ it is easy to prove that the answer is yes.
If $n \geq 3$.
Pick $x_3=\pi$ and $x_2=10-2 \pi$. Let $x_1=5+\pi$, $x_4,..,x_n \in \mathbb Q$.
More generarily
$$x_3 \notin \mathbb Q \,;\, x_2=n-2x_3 \,;\,x_1=m+x_3$$
P.S. If instead you ask that for all $1 \leq k \leq n$ you have
$$x_1+2x_2+..+kx_k \in \mathbb Q$$
then it is simple to show that all of them are rational.
A: No, if $n \geq 3$. Consider the following example for $n=3$: $x_1 =\pi$, $x_2 = 10-2\pi$, $x_3= \pi$.
