Intro and reference request.
This post is about a generalization of the following: Construct $(a_n)$ such that $\sum_n a_n^k$ converges for only specified $k$, which I found to be particularly interesting and surprising since it is very counterintuitive. I had such a good time proving the infinite case that I wanted to go further and generalize it to subsets of any positive natural number, not only odd ones.
My question is: do you know if the following result has been proven, and thus have some reference talking about it?
Let $K \subset \mathbb{N}^*$, there exists a complex sequence $\left(a_n \right)_{n \in \mathbb{N}} \in \mathbb{C}^\mathbb{N}$ such that $$\sum_n a_n^k \quad \text{converges} \iff k \in K.$$
And if you do, does it look like my proof or is it completely different without an explicit construction? Another insight of mine would have been to use orthogonal polynomials but I haven't given it much time.
I already have a proof that you are welcome to check if you have enough time. It is basically a recycling of the original proof I provided with inspiration from Robert Israel's answer, the real adjustment is in the first part.
Proof
Motivation for the generalization.
In the original case, we played with the properties of alternative series in a way, and took advantage of the fact that if $k$ is odd, $(-1)^k = -1$. The problem with even $k$ is that with real coefficient, it gives only positive result which will end up in absolute convergence, and we absolutely need to avoid it.
But now we have allowed complex coefficient and we have access to $p$-th roots of the unity, so we should be able to deal with the case $K \subset \mathbb{N} \setminus p \mathbb{N}$, and still with a Cantor's diagonal extraction process we should directly be able to treat the case $K \subset \mathbb{N} \setminus \sup_{p \in \mathcal{P}} p \mathbb{N} = \mathbb{N}^*$.
Proof
Take $K= \{k_1 < k_2 < \dots\}$ a set of positive natural numbers. We denote $K_m = \{k_1,\dots,k_m\}$. Of course if $K$ is empty, the proof is trivial, thus we will suppose it isn't.
First step
We now need to use a polynomial that detects $2^k$ as a root iff $k \in K$, but for it to be used in the same way as before, we need to have coefficients that verify more or less $$\lambda^k = \lambda$$ For this we first study $$\lambda^p = 1$$ The only non-zero solutions of this equation are exactly elements of the set $U_p = \{\mu^1, \dots,\mu^p \}$ of $p$-th roots of the unity, which is a group isomorphic to $\mathbb Z / p \mathbb{Z}$. This is nice since for any $k$ prime with $p$, the group morphism $\lambda \mapsto \lambda^k$ fixes $1$ but permutes $U_p \setminus \{1\} = U_p^\times$ the primitive $p$-th roots of the unity.
We thus define for$m \geq 1$ and $p \in \mathcal{P}$, the polynomial $$\begin{align*} g_{p,m}(X) &= \left(\prod_{j=1}^m (X^p-2^{pk_j}) \right)^2 \\ &= \left(\prod_{j=1}^m \prod_{\lambda \in U_p} (X-2^{k_j}\lambda) \right)^2 \\ &= \epsilon_{2mp}d_{2mp}X^{2mp} + \cdots + \epsilon_1 d_1 X+ \epsilon_0 d_0 & \text{with} \, \epsilon_i \in \{-1,1\} \, \text{and} \, d_i \in \mathbb{N}. \end{align*}$$
Its only roots are the $2^k \lambda$ for $k \in K_m$ and $\lambda \in U_p$ and $g_{p,m} (\mathbb{Z}) \subset \mathbb{N}$.
The problem we face now is that in the case $p = 2$, $-1 \in U_2$ but this is not the case in general, hopefully, we have one convenient solution: $\sum_{\lambda \in U_p} \lambda = 0$, thus $\sum_{\lambda \in U_p^\times} \lambda = -1$.
This gives us
$$\begin{align*}
g_{p,m}(X)
&= \epsilon_{2mp}d_{2mp}X^{2mp} + \cdots + \epsilon_1 d_1 X+ \epsilon_0 d_0 \\
&= \sum_{i = 0}^{2mp} \sum_{\lambda \in U_p} \lambda d_{i,\lambda} X^i
\end{align*}$$
with $d_{i,\lambda} \in \mathbb{N} ,\, d_{i,\lambda} \neq 0 \iff d_{i,1} = 0$ and $ d_{i,\lambda}= d_{i,\lambda'} $ for $1\le i \le 2mp$ and $\lambda,\lambda' \in U_p^\times$.
We achieve that by replacing any $\epsilon_i = -1$ by $\sum_{\lambda \in U_p^\times} \lambda$.
This decomposition may be unique (not sure) but it is not needed since it can be explicited. I have made another post on this matter: Unicity of decomposition for the monoid generated by roots of the unity.
We then define $$f_{p,m} (x) = g_{p,m}(2^x) = \left( \prod_{j=1}^m (2^x-2^{n_j}) \right)^2$$ and $$\forall 0\le i \le 2m, \, \forall 1\le q \le p, \, \forall 1\le j \le d_i^q, \qquad b_{m,p,D_i + u_i^q + j} = \mu^j 2^i \qquad \text{where} \, D_i = \sum_{l =0}^{i-1} u_{i,p} \, \text{and} \, u_{i,q} = \sum_{l=1}^{q-1} d_{i,\mu^q} .$$
A few remarks:
- $d_{2mp,\mu^q}=\delta_p^q$.
- It gives us $r_{p,m} = D_{2mp+1} \quad b_{m,p,j}$'s.
- We have for $i,q$ exactly $d_{i,q} \quad b_{m,p,j}$'s that are equal to $\mu^i 2^i$.
Now we make some observations:
- $f_{m,p}(k) = 0 \iff k \in K_m$.
- $f_{m,p}(k) \in \mathbb{N}$.
- $f_{m,p}(k) = b_{m,p,1}^k + \cdots + b_{m,p,r_{p,m}}^k$ for $k \wedge p = 1$ since for $\lambda \in U_p^\times$, $\lambda \mapsto \lambda^k$ is a bijection and $d_{i,\lambda}$ does not depend on $\lambda$.
- $k \wedge p = 1$ is verified when $0<k<p$.
- $b_{m,p,i}^k = 2^{kj} \ge 1$ for some $j$ when $p \mid k$.
Second step: construction of the sequence.
When $K$ is finite.
$K = K_m$ for some $m$. We know there exists a prime $p$ such that $p \wedge k =1 \, \forall k \in K$, thus we define $f = f_{p,m}$, $r=r_{p,m}$ and $$b_{j} = b_{p,m,j} \quad \text{for}\, 1 \le j \le r$$ And then we define $$a_n = \frac{b_{n [r]}}{\log (n//r +2)}$$ where $j[r]$ is the rest of the division of $n$ by $r$ and $n//r = \frac{n- n[r]}{r}$.
Basically the sequence is $\frac{b_1}{\log 2}, \frac{b_2}{\log 2}, \dots , \frac{b_r}{\log 2}, \frac{b_1}{\log 3}, \frac{b_2}{\log 3}, \dots$.
We now take $N = Sr + T$ with $0 \le T <r$, we get $$\begin{align*} \sum_{n=0}^N a_n^k &= \sum_{s=0}^{S-1} \sum_{t=0}^{r-1} a_{sr+t}^k + \sum_{t=0}^T a_{Sr + t}\\ &= \sum_{s=0}^{S-1} \sum_{t=0}^{r-1} \frac{b_t^k}{\log (s+2)^k} + \sum_{t=0}^T \frac{b_t^k}{\log (S+2)^k}\\ \end{align*}$$
Case 1: $k \wedge p =1$.
$$\begin{align*} \sum_{n=0}^N a_n^k &= \sum_{s=0}^{S-1} \sum_{t=0}^{r-1} \frac{b_t^k}{\log (s+2)^k} + \sum_{t=0}^T \frac{b_t^k}{\log (S+2)^k}\\ &= \sum_{s=0}^{S-1} \frac{f(k)}{\log (s+2)^k} + \sum_{t=0}^T \frac{b_t^k}{\log (S+2)^k}\\ \end{align*}$$
Case 1.1: $k \in K$
$$\begin{align*} \sum_{n=0}^N a_n^k &= \sum_{s=0}^{S-1} \frac{f(k)}{\log (s+2)^k} + \sum_{t=0}^T \frac{b_t^k}{\log (S+2)^k}\\ &= 0 + \sum_{t=0}^T \frac{b_t^k}{\log (S+2)^k}\\ &= \dfrac{\sum_{t=0}^T b_t^k}{\log (S+2)^k} \to 0 \end{align*}$$ Which means $\sum a_n^k$ converges.
Case 1.2: $k\notin K$.
$$\begin{align*} \sum_{n=0}^N a_n^k &= \sum_{s=0}^{S-1} \frac{f(k)}{\log (s+2)^k} + \sum_{t=0}^T \frac{b_t^k}{\log (S+2)^k}\\ &= f(k)\sum_{s=0}^{S-1} \frac{1}{\log (s+2)^k} + \dfrac{\sum_{t=0}^T b_t^k}{\log (S+2)^k} \to \infty \end{align*}$$ Which means $\sum a_n^k$ diverges.
Case 2: $p \mid k$.
$$\begin{align*} \sum_{n=0}^N a_n^k &= \sum_{s=0}^{S-1} \sum_{t=0}^{r-1} \frac{b_t^k}{\log (s+2)^k} + \sum_{t=0}^T \frac{b_t^k}{\log (S+2)^k}\\ &\ge \sum_{s=0}^{S-1} \sum_{t=0}^{r-1} \frac{1}{\log (s+2)^k}\\ &= \sum_{s=0}^{S-1} \frac{r}{\log (s+2)^k} \to \infty \end{align*}$$ Which means $\sum a_n^k$ diverges.
When $K$ is infinite.
The idea here is to sum paquets that will be zero when $k \in K$ up to a certain rank, ensuring the size of these paquets is small enough to converge. Before that, we will make a more convenient definition for our summands.
First the set of prime numbers $\mathcal P$ can be ordered as $\{p_1< p_2 < \cdots \}$. We introduce the prime counting function
$$\pi(n) = \min \{k \in \mathbb{N}^* \mid p_k \ge n \}$$
We then define for $m \in \mathbb{N}^*$
$$\begin{align*}
f_{m} &= f_{p_{\pi(k_m+1)},m}\\
r_m &= r_{p_{\pi(k_m+1)},m}\\
b_{m,j} &= b_{p_{\pi(k_m+1)},m,j} & \text{for} \, 1\le j \le r_m.
\end{align*}$$
This ensures that for $l \le k_m$, $f_{m}(l) = b_{m,1}^l + \cdots + b_{m,r_m}^l$.
Since the summation by paquets will be more tricky than usual, we need to define not $1$ but $3$ sequences for more coherence: $c_n$, $R_n$ and $a_n$. We could do it "by hand" but since it begins to be very tricky, let us do it right!
- Initialisation: $$\begin{align*} c_1 &= 1\\ R_1 &= 0\\ a_j &= \frac{b_{1,j}}{\log 2} & \text{for} \quad 1\le j \le r_1 \end{align*}$$
- If $\dfrac{\sum_j |b_{(c_{n-1}+1),j}|^{k_{(c_{n-1}+1)}}}{\log (n+1)} \le \frac{1}{n}$ $$\begin{align*} c_n &=c_{n-1}+1\\ R_n &= R_{n-1} + r_{c_{n-1}}\\ a_{R_n+j} &= \frac{b_{c_n,j}}{\log (n+1)} & \text{for} \quad 1\le j \le r_{c_n} \end{align*}$$
- If $\dfrac{\sum_j |b_{(k_{n-1}+1),j}|^{n_{(c_{n-1}+1)}}}{\log (n+1)} > \frac{1}{n}$ $$\begin{align*} c_n &=c_{n-1}\\ R_n &= R_{n-1} + r_{c_{n-1}}\\ a_{R_n+j} &= \frac{b_{c_n,j}}{\log (n+1)} & \text{for} \quad 1\le j \le r_{c_n}. \end{align*}$$
The intuition behind this, is that I need to ensure that the divisor is big enough compared to the paquet to converge to $0$ otherwise we don't have convergence for $k \in K$ since the paquet will be too big. In this spirit we have:
- $c_n$ knows the index $m$ of $K_m$ the paquet recognizes and ensure that the divisor is big enough for the sum of his paquet to absolutely converge to $0$.
One can say that if $c_n = m$, all the $k \in K$ smaller or equal to $n_m$ (so the $m$ first) are dealt with.- $R_n$ just counts the beginning index of each paquet: the $n$-th paquet is $\{R_n +1, R_n + 2, \dots, R_{n+1}\}$.
Last step: proof of convergence (and divergence).
Let $k \in \mathbb{N}^*$
Since $K$ is infinite, for $m$ big enough, $k \leq k_m$. We thus take $M$ such that $k \leq k_{c_M}$
Note that it exists since $c_n$ is non-decreasing and non-stationary, thus it diverges to $\infty$ and it increments at most of $1$ at every step.
Now if we take $N = R_p + q $ big enough for the considerations we need further with $1 \le q \le r_{c_p}$ (so $N$ in the $p^\text{th}$ paquet). $$\begin{align*} \sum_{n=1}^N a_n^k &= \sum_{t=1}^{M-1} \sum_{j=1}^{r_{c_t}} a_{R_t +j }^k + \sum_{t=M}^{p-1} \sum_{j=1}^{r_{c_t}} a_{R_t +j }^k + \sum_{j=1}^q a_{R_p + j}^k\\ &= \sum_{t=1}^{M-1} \sum_{j=1}^{r_{c_t}} a_{R_t +j }^k + \sum_{t=M}^{p-1} \sum_{j=1}^{r_{c_t}} \left( \dfrac{b_{c_t,j}}{\log (t+1)} \right)^k + \sum_{j=1}^q \left( \dfrac{b_{c_p,j}}{\log (p+1)} \right)^k \\ &= \sum_{t=1}^{M-1} \sum_{j=1}^{r_{c_t}} a_{R_t +j }^k + \sum_{t=M}^{p-1} \dfrac{f_{c_t}(k)}{\log (t+1)^k} + \sum_{j=1}^q \left( \dfrac{b_{c_p,j}}{\log (p+1)} \right)^k \\ \end{align*}$$ Since the first term is constant, we only need to study the nature of the second and third.
Case 1: $k \in K$
There exists $m \in \mathbb{N}$ such that $n_m = k$, thus for $m' \ge m, \, f_{m'} (k) = 0$.
We take $T$ such that $c_T = m$.
We define $\alpha(t)$ as the unique integer verifying $$c_{\alpha(t)} = c_t$$ And $$c_{\alpha(t)} = c_{\alpha(t)-1} +1$$
it is easy to verify that it is increasing and non stationary thus it diverges to $\infty$.
$$\begin{align*} \sum_{n=1}^N a_n^k &= \sum_{t=1}^{M-1} \sum_{j=1}^{r_{c_t}} a_{R_t +j }^k + \sum_{t=M}^{p-1} \dfrac{f_{c_t}(k)}{\log (t+1)^k} + \sum_{j=1}^q \left( \dfrac{b_{c_p,j}}{\log (p+1)} \right)^k \\ &= \sum_{t=1}^{M-1} \sum_{j=1}^{r_{c_t}} a_{R_t +j }^k + \sum_{t=M}^{T-1} \dfrac{f_{c_t}(k)}{\log (t+1)^k} + \sum_{t=T}^{p-1} \dfrac{f_{c_t}(k)}{\log (t+1)^k} + \sum_{j=1}^q \left( \dfrac{b_{c_p,j}}{\log (p+1)} \right)^k \\ &= \sum_{t=1}^{M-1} \sum_{j=1}^{r_{c_t}} a_{R_t +j }^k + \sum_{t=M}^{T-1} \dfrac{f_{c_t}(k)}{\log (t+1)^k} + 0 + \sum_{j=1}^q \left( \dfrac{b_{c_p,j}}{\log (p+1)} \right)^k \\ &= \sum_{t=1}^{M-1} \sum_{j=1}^{r_{c_t}} a_{R_t +j }^k + \sum_{t=M}^{T-1} \dfrac{f_{c_t}(k)}{\log (t+1)^k} + \sum_{j=1}^q \left( \dfrac{b_{c_p,j}}{\log (p+1)} \right)^k \end{align*}$$ But the first two terms are constants, so we only need to study the third (recall that $|b_{c_p,j}|\ge 1$ so $|b_{c_p,j}|^k\le |b_{c_p,j}|^{k_{c_p}}$): $$\begin{align*} \left| \sum_{j=1}^q \left( \dfrac{b_{c_p,j}}{\log (p+1)} \right)^k \right| &\le \sum_{j=1}^q \dfrac{|b_{c_p,j}|^k}{\log ((p+1))^k} \\ &\le \sum_{j=1}^{r_{c_p}} \dfrac{|b_{c_p,j}|^{k_{c_p}}}{\log(p+1)} \\ &\le \sum_{j=1}^{r_{c_{\alpha(p)}}} \dfrac{ |b_{c_{\alpha(p)},j}|^ {k_{c_{\alpha(p)}}} }{\log( \alpha(p)+1)} \\ &\le \dfrac{1}{\alpha(p)} \to 0 \end{align*}$$
We have $\log (\alpha(p)+1)^k \ge \log (\alpha(p)+1)$ since we supposed $N$ big enough.
Which means $\sum a_n^k$ converges!
Case 2: $k \notin K$.
We have from the previous observation $f_m(k)\ge 1$ for all $m \in \mathbb{N}$. This gives us $$\begin{align*} \sum_{n=1}^N a_n^k &= \sum_{t=1}^{M-1} \sum_{j=1}^{r_{c_t}} a_{R_t +j }^k + \sum_{t=M}^{p-1} \dfrac{f_{c_t}(k)}{\log (t+1)^k} + \sum_{j=1}^q \left( \dfrac{b_{c_p,j}}{\log (p+1)} \right)^k \\ &\ge \sum_{t=1}^{M-1} \sum_{j=1}^{r_{c_t}} a_{R_t +j }^k + \sum_{t=M}^{p-1} \dfrac{1}{\log (t+1)^k} + \sum_{j=1}^q \left( \dfrac{b_{c_p,j}}{\log (p+1)} \right)^k \\ &\ge \sum_{t=1}^{M-1} \sum_{j=1}^{r_{c_t}} a_{R_t +j }^k + \sum_{t=M}^{p-1} \dfrac{1}{\log (t+1)^k} - \left|\sum_{j=1}^q \left( \dfrac{b_{c_p,j}}{\log (p+1)} \right)^k \right|\\ &\ge \sum_{t=1}^{M-1} \sum_{j=1}^{r_{c_t}} a_{R_t +j }^k + \sum_{t=M}^{p-1} \dfrac{1}{\log (t+1)^k} - \dfrac{1}{\alpha(p)} \to \infty\\ \end{align*}$$ Which means $\sum a_n^k$ diverges.
Conclusion:
As wished, $$\sum a_n^k \, \text{converges} \iff k \in K.$$
In summary, as counterintuitive as in can be, for any subset $K \subset \mathbb{N}^*$ there exists an explicit (so no need of the AoC) real sequence $(a_n)$ such that $\sum a_n^k$ converges iff $k \in K$.