Let $x_1,\cdots, x_k$ be real numbers such that the set $A := \{\cos (n\pi x_1)+\cdots + \cos(n\pi x_k) : n\ge 1\}$ is finite. Show that $x_i \in \mathbb{Q}$ for all i.
Let $A = \{a_1,\cdots, a_j\}$. Note that the set of $k$-tuples $(a_n, a_{2n},\cdots, a_{kn})$ is finite. It might be possible to use the Pigeonhole principle somehow to show that there exists $n < m$ with $\cos (n\pi x_i) = \cos (n\pi x_{\sigma(i)})$ for some permutation $\sigma$ of $\{1,\cdots, k\}$. But I'm not sure how to proceed. If each $x_1$ is an integer, then obviously the given set is finite, being a sum of $k$ numbers all equal to $\pm 1$.