Signed harmonic series containing floor function Where it converges, let $$S\left(a\right)=\sum_{n=0}^\infty \frac{\left(-1\right)^{\left[na\right]}}{\lfloor na\rfloor+1},$$
where $a\gt 0$, and $\lfloor\cdot\rfloor$ denotes the floor function. For instance, we have $S\left(\frac{1}{k}\right)=k\ln 2$.
Let $A=\left\{a\mid S\left(a\right)\:\text{ converges}\right\}$. My questions are:
• Does $A$ contain any irrational numbers?
• Is $A$ an uncountable set? A full-measure set?
• If so, I would guess the following limit: $$\lim_{a\in A, a\rightarrow 0^+}a\, S\left(a\right)=\ln 2$$
Am I right?
 A: You are asking several questions in this post:

*

*For which $a\in \mathbb{Q}$ does $S(a)$ converge?

*What can we say about $A\cap \mathbb{Q}^c$?

*Do we have $\lim\limits_{a\in A,a\to 0^+} a S(a)=\ln(2)$?

Here are my answers.

*

*Let $a\in\mathbb{Q}$, $a=p/q$ in lowest terms; assume without loss of generality that $a\ge 0$. Then $S(a)$ converges if and only if $p$ is odd.

*$S(a)$ converges for almost every $a\in [0,2]$.

*Yes, by continuity.

Proofs

*

*Two basic facts: first, if $(c_n)$ is a periodic sequence of $+1$ and $-1$ with period $M$, a necessary and sufficient condition for $\sum_{n=0}^{\infty} \frac{c_n}{n+1}$ to converge is that $\sum_{n=0}^{M-1} c_n=0$ (sufficient by telescoping; necessary by comparison tests). Second, the behavior of $p/q$ under $\lfloor\cdot \rfloor$ is exactly the same as the behavior of $(p+2q)/q$ up to a negative sign; thus for fixed $q$ it suffices to consider $0\leq p\leq 2q-1$.

Observe that $(-1)^{\lfloor n a\rfloor }$ is periodic with period $2q$: the 'runs' of $\pm$ are periodic with length $q$, but the key issue is whether the signs are flipped for the latter half. For example, for $a=3/7,4/7$, we have:
$$
\{(-1)^{\lfloor  3/7 \cdot n\rfloor }\} = \{1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1,\cdots\}
$$
$$
\{(-1)^{\lfloor  4/7\cdot n\rfloor }\} =\{1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1,\cdots\}
$$If $p$ is even, the behavior for $0\leq p\leq q-1$ is repeated for $q\leq p\leq 2q-1$ ; if $p$ is odd, the behavior is repeated but signs are flipped. Therefore, $\sum_{k=0}^{2q-1} (-1)^{\lfloor p/q\cdot n\rfloor}=0$ iff $p$ is odd. The structure of the runs is somewhat more delicate and would make an interesting question in its own right, but isn't necessary for this problem.


*Note that $\sum_{n\ge 0} (1+\lfloor n a\rfloor)^{-2}$ converges for positive $a$ (and negative $a$ if we can avoid $\lfloor n a\rfloor=-1$). Further, $S(a)$ is periodic with period $2$ as we showed above, so $S$ is the Fourier series of an $L^2$ function. Then by a theorem of Carleson $S(a)$ converges pointwise a.e on $[0,2]$ (credit to Conrad for a similar idea in this post of mine).


*The result holds for $a=1/q$ and we can invoke continuity on $A$.
