# Is there a sequence so that $\sum |a_n|=\infty$ and $\sum a_n \cos(nx)$ and $\sum a_n \sin(nx)$ converge everywhere?

Let the series be $$(s_n a_n)_n$$ where $$s_n\in\{-1,1\}$$ and $$a_n$$ decreases to $$0$$ instead for convenience. If $$s_n$$ is eventually periodic you can choose an $$x$$ which is a rational multiple of $$\pi$$ and most of the terms $$s_n\cos(nx)$$ are non-negative, so the series diverges at that point. If $$s_n$$ is not equidistributed, that is it's not true that $$\lim_N \frac 1N\sum_{n\leq N}s_n=0$$, then it's also clear that the series must diverge somewhere. What's intriguing me is that you can choose $$s_na_n=\frac 1n$$ and have the sine series converge, but then the cosine series diverges. That happens even though the relationship between the sine and cosine series is not clear. It feels like the choice of $$a_n$$ is not as important as the choice of the signs. I tried for example

$$s_na_n=\frac{(-1)^{\lfloor n\sqrt 2\rfloor}}n$$

but it seems numerically that the series diverges near $$x=1.84$$.

I think this question is equivalent to: if a sequence of signs $$s_n$$ is not eventually periodic, then there's a choice of integers so that $$s_n\sin\left(\pi \frac pq\right)$$ or $$s_n\cos\left(\pi \frac pq\right)$$ are not equidistributed. I think that statement encodes something about how there's no way to choose a sequence of signs so that you avoid correlation with all the sequences $$\text{sign}\left(\cos\left(\pi \frac pq\right)\right)$$.

• If $x=2m\pi$, including $x=0$, then the cosine series obviously doesn't converge. Jul 3, 2022 at 2:02

Another cool example is Hardy-Littlewood's function $$\sum_{n \ge 2}\frac{e^{i n \log n}}{n^a}z^n, 1/2 < a \le 1$$ which (by partial summation) converges uniformly on the unit circle because $$\sum_{2 \le n \le N}e^{i n \log n}=O(\sqrt N)$$ by standard exponential sum theory (second derivative criterion plus binary summation)
If $$\sum_{n\geq0} |a_n|<\infty$$ were true, then $$f(w)=\sum_{n\geq0} a_n w^n$$ would be a continuous function on the complex unit circle.