Limit involving sampling a sum along a density zero set This is a problem that came up in a research project that I have been working on for a while now. I have asked a number of people, and they have not been able to make any headway on it either.
Let $(a_n)$ be a monotonically decreasing sequence of positive real numbers such that


*

*$\lim_{n \to \infty} a_n = 0$;

*$\sum_{n=1}^\infty a_n^k = \infty$ for all $k \in \mathbb{N}$;

*$\lim_{n \to \infty} \frac{a_{n+1}}{a_n} = 1$.


Is it true that for every set $S \subset \mathbb{N}$ of density zero that
\begin{equation}
\lim_{n \to \infty} \frac{\sum_{i=1}^n \chi_S(i) a_i}{\sum_{i=1}^n a_i} = 0
\end{equation}
where $\chi_S$ is the indicator function on $S$?
I have found counterexamples when condition three is not assumed, but I'm not sure if adding this condition is enough to get the desired limit for all $S$. If the given conditions are not strong enough, what extra assumptions can we make?
Note that sequences such as $a_i = \frac{1}{\log(i+1)}$ have the desired property that the above limit is always $0$.
 A: It's not true. I'll not prove this in detail, but rather construct a provocative finite sequence. It is then easy to see, but very tedious to describe, how to construct a full counterexample by concatenating successive instances of such "bad" finite sequences.
Let $r,f>0$, and $0<d,\epsilon<1$. Also, let $Q$ be a positive integer. Given all these values, I'll find a finite sequences $a_1,\ldots,a_N$ and $\xi_1,\ldots,\xi_N$, arbitrarily long, such that


*

*$a_1 = f$

*$a_1\ge a_n>0$

*$\xi_n\in\{0,1\}$

*$a_N = a_1 e^{-Qr}$

*$\left|\log\left(\frac{a_{n+1}}{a_n}\right)\right|\le r$

*$\frac{\sum_{k=1}^n \xi_k}{n} \le d \text{ for $n=1,\ldots,N$}$

*$\frac{\sum_k \xi_k a_k}{\sum_k a_k} \ge \epsilon$.


[Mnemonics: $f$ is first, $r$ is ratio bound, $d$ is density bound.]
In other words, no matter what the value of $a_1$, we can construct arbitrarily long sequences $a_n,\xi_n$ with arbitrarily low density of $\xi_n$, $a_n$ bounded by $a_1$, arbitrarily small variation $a_{n+1}/a_n$, and arbitrarily small ending value $a_N=a_1 e^{-Qr}$ even though
$$
\frac{\sum_k \xi_k a_k}{\sum_k a_k} \ge \epsilon.
$$
For positive integers $P\ge Q$, $L$, and $H$, define the finite sequence $a_1,\ldots,a_N$ where $N\equiv 2P+L-Q+H$ as follows:
\begin{eqnarray}
a_k &=& f e^{-(k-1)r} \text{  for $k=1,\ldots,P$} \\
a_k &=& f e^{-Pr} \text{  for $k=P+1,\ldots,P+L$} \\
a_k &=& f e^{-(2P+L-k)r} \text{  for $k=P+L+1,\ldots,2P+L-Q$} \\
a_k &=& f e^{-Qr} \text{  for $k=2P+L-Q+1,\ldots,2P+L-Q+H$}.
\end{eqnarray}
Also, define $\xi_1,\ldots,\xi_N$ to be
\begin{eqnarray}
\xi_k &=& 0 \text{ for $k\le 2P+L-Q$} \\
\xi_k &=& 1 \text{ for $k= 2P+L-Q+1,\ldots,2P+L-Q+H$}.
\end{eqnarray}
[Mnemonics: $H$ is the number of entries of $a_n$ at the "high" value $f e^{-Qr}$, and $L$ is the number of entries at the "low" value $f e^{-Pr}$.]
Observe
$$
\frac{\sum_{k=1}^n \xi_k}{n} \le \frac{\sum_k \xi_k}{N} = \frac{H}{N} = \frac{H}{2P - Q + H + L} \text{ for all $n=1,\ldots,N$}
$$
and
$$
\frac{\sum_k \xi_k a_k}{\sum_k a_k} \ge \frac{H e^{-Qr}}{2P - Q + L e^{-P r} + H e^{-Qr}}.
$$
Now suppose $L = \lceil\alpha_L H\rceil$ and $P = \lceil\alpha_P H\rceil$ for some $\alpha_L,\alpha_P >0$. From the last two equations,
\begin{eqnarray}
\lim_{H\to\infty}\frac{\sum_k \xi_k}{N} &=& \frac{1}{2\alpha_P + \alpha_L + 1} \\
\liminf_{H\to\infty}\frac{\sum_k \xi_k a_k}{\sum_k a_k} &\ge&
\frac{e^{-Qr}}{2\alpha_P + e^{-Qr}}.
\end{eqnarray}
Now just choose $\alpha_P>0$ small enough that $\frac{e^{-Qr}}{2\alpha_P + e^{-Qr}} > \epsilon$ and then choose $\alpha_L$ big enough that $\frac{1}{2\alpha_P + \alpha_L + 1}<d$. It follows that with $H$ large enough, $L = \lceil\alpha_L H\rceil$, and $P = \lceil\alpha_P H\rceil$,
\begin{eqnarray}
\frac{\sum_{k=1}^n \xi_k}{n} &<& d \text{ for $n=1,\ldots,N$} \\
\frac{\sum_{k=1}^N \xi_k a_k}{\sum_{k=1}^N a_k} &>& \epsilon.
\end{eqnarray}
Finally, note that we can make $H$, and therefore $N$, arbitrarily long without breaking these conclusions. In this way, we can make $\sum_{n=1}^N a_n^k>1$ for all $k=1,\ldots,K$. By concatenating successive finite sequences obeying this inequality with increasing $K$, we ensure $\sum a_n^k = \infty$ for all $k>0$.
