# Convergence of $\sum_{n=1}^\infty x_n^k$

Let $$S\subseteq \mathbb Z^+$$ be a set of positive odd numbers. I am asked to prove that there exists a sequence $$(x_n)$$ such that for any positive integer $$k$$, $$\sum_{n=1}^\infty x_n^k$$ converges iff $$k\in S$$. I have no idea where to start. Even in the special case $$S=\{1\}$$ I don't know if any sequence would work.

Any hints?

If $$S=\{1\}$$, then we have to find a sequence such that $$\sum x_n$$ converges but $$\sum x_n^k$$ doesn't for $$k\geq 2$$. However, for a positive sequence, if $$\sum x_n^k$$ converges then $$\sum x_n^{k+1}$$ converges, so we must not choose $$(x_n)$$ to be a sequence of positive terms. But what can I do next?

For $$S=\{1\}$$, one can use a sequence of the form $$2c_1,-c_1,-c_1;2c_2,-c_2,-c_2;2c_3,-c_3,-c_3,\dots$$ where $$\{c_1,c_2,\dots\}$$ is, say, a sequence decreasing to $$0$$ not too fast, such as $$c_j = 1/\log(j+1)$$.
For more complicated $$S$$, I suspect a similar approach will work, using this sort of "hybridization" of a periodic sequence whose appropriate powers sum to $$0$$ over every period with a slowly decreasing sequence.