Recently, I've encountered the following question:


Assume that $n\_{1}, \ldots, n\_{k}$ are (not necessary distinct) natural numbers. If


$$ (\sum\_{i = 1}^{k}\sqrt{n\_{i}}) \in \mathbb{N},$$ can we conclude that all $n\_{i}$'s are perfect squares? Is there any famous theorem that answer this question? Or, can anyone introduce some references to help me know about this problem?


Thanks in advance.



Sum of square roots of natural numbers
Let us show a more general statement, and then show how it implies your question: given distinct positive squarefree numbers $n\_1, n\_2, \dots, n\_k$, the numbers $\sqrt{n\_1}, \dots, \sqrt{n\_k}$ are linearly independent over $\mathbb{Q}$.


Proof: Suppose that
$$\sum\_{i = 1}^{k} a\_i \sqrt{n\_i} = 0$$
where without loss of generality, $a\_1 \neq 0$. Dividing by $\sqrt{n\_1}$ we get
$$a\_1 + \sum\_{i = 2}^{k} a\_i \sqrt{\frac{n\_i}{n\_1}} = 0$$
Take the trace of this algebraic number with respect to the field extension $\mathbb{Q} \left( \sqrt{\frac{n\_2}{n\_1}}, \dots, \sqrt{\frac{n\_k}{n\_1}} \right) / \mathbb{Q}$. On the one hand, it should be 0. On the other hand, for all $i \neq 1$, the trace of $\sqrt{\frac{n\_i}{n\_1}}$ is 0 as it as a multiple of the trace of this number with respect to the field extension $\mathbb{Q} \left( \sqrt{\frac{n\_i}{n\_1}} \right) / \mathbb{Q}$, and of course the trace of $a\_1$ is some nonzero multiple of $a\_1$, which is a contradiction.


In fact, I believe that this argument works even if we take $\sqrt[m\_i]{n\_i}$, where $m\_i \geq 2$ are some positive integers.




---


Now to the question: for $1 \leq i \leq k$ write $n\_i = r\_i s\_{i}^2$ where $r\_i$ is squarefree. Then we have
$$\sum\_{i = 1}^{k} \sqrt{n\_i} = \sum\_{i = 1}^{k} s\_i \sqrt{r\_i}$$
Combining terms with the same $r\_i$, if not all $n\_i$'s are perfect squares (that is equivalently, some $r\_i$ is nonzero), then if this number is rational then we have a nontrivial linear combination of $1$ and some square roots of distinct squarefree positive integers, which as we showed above is a contradiction.


