Convergence of series with negative terms Among the series $\sum\limits_{n=1}^{\infty}\frac{(-1)^{\lfloor \sqrt{n}\rfloor}}{n}, \sum\limits_{n=1}^{\infty} \frac{(-1)^{\lfloor\log n\rfloor}}{n}$, and $\sum\limits_{n=1}^{\infty}\frac{(-1)^{\lfloor \sqrt{n}\rfloor}}{\sqrt{n}}$; which are convergent?
The leibniz test fails here as the series are not alternating and the series are not absolutely convergent. I think we have to consider separately the sum of positive and negative terms and then check for their convergence.  Any hints? Thanks beforehand.
 A: 1. Denote by $S_m = \sum_{n=1}^{m} \frac{(-1)^{\lfloor \sqrt{n}\rfloor}}{n}$ the $m$th partial sum. Define $N_0 = 1$ and let $N_k$ be the $k$-th index at which the sign of the sequence $\{(-1)^{\lfloor \sqrt{n}\rfloor}\}_{n=1}^{\infty}$ flips. In fact, we have $N_k = (k+1)^2$. Then $S_m$ lies between $S_{N_{k-1}-1}$ and $S_{N_k-1}$ whenever $N_{k-1} \leq m < N_k$ holds. So by applying the Squeezing Theorem, we can easily prove that $\{S_m\}_{m=1}^{\infty}$ converges if and only if $\{S_{N_k - 1}\}_{k=1}^{\infty}$ converges.
Now, for each given $K \geq 1$,
$$ S_{N_k-1}
= \sum_{n=1}^{N_K-1} \frac{(-1)^{\lfloor \sqrt{n}\rfloor}}{n}
= \sum_{k=1}^{K} (-1)^{k} \sum_{n = N_{k-1}}^{N_k - 1} \frac{1}{n}. $$
Then by using that $ \left| \frac{1}{n} - \log\left(1+\frac{1}{n}\right) \right| \leq \frac{C}{n^2} $ for some $C > 0$ and $\log\left(\frac{N_k}{N_{k-1}}\right) = 2\log\left(1+\frac{1}{k}\right)$,
\begin{align*}
\left| \left( \sum_{n = N_{k-1}}^{N_k - 1} \frac{1}{n} \right) - \frac{2}{k} \right|
&\leq 2 \left| \log\left(1+\frac{1}{k}\right) - \frac{1}{k} \right| + 
\sum_{n = N_{k-1}}^{N_k - 1} \left| \frac{1}{n} - \log\left(1+\frac{1}{n}\right) \right| \\
&\leq \frac{2C}{k^2} + \sum_{n = N_{k-1}}^{N_k - 1} \frac{C}{n^2}
\end{align*}
From this, we deduce:
$$ \sum_{k=1}^{\infty} \left| (-1)^k \left( \sum_{n = N_{k-1}}^{N_k - 1} \frac{1}{n} \right) - \frac{2}{k} \right| < \sum_{k=1}^{\infty} \frac{2C}{k^2} + \sum_{n=1}^{\infty} \frac{C}{n^2} < \infty $$
This reveals that $S_{N_k-1}$ is written as the sum of $\sum_{k=1}^{K} (-1)^k \frac{2}{k}$ and a convergent term, and hence $S_{N_k-1}$ converges by the alternating series test.

2. Now we consider $S_m = \sum_{n=1}^{m} \frac{(-1)^{\lfloor \sqrt{n}\rfloor}}{\sqrt{n}}$. Let $N_k$ be as in the previous part. Then
$$ \left| S_{N_k-1} - S_{N_{k-1}-1} \right|
= \sum_{n = N_{k-1}}^{N_k - 1} \frac{1}{\sqrt{n}}
\geq \int_{N_{k-1}}^{N_k} \frac{\mathrm{d}x}{\sqrt{x}}
= 2\left( \sqrt{N_k} - \sqrt{N_{k-1}} \right) = 2. $$
Therefore $S_m$ does not converge.

3. Let $S_m = \sum_{n=1}^{m} \frac{(-1)^{\lfloor \log n \rfloor}}{n}$. Similarly as before, define $N_0 = 1$ and let $N_k$ be the $k$-th index at which the sign of the sequence $\{(-1)^{\lfloor \log n \rfloor}\}_{n=1}^{\infty}$ flips. It is easy to find that $N_k = \lceil e^k \rceil $. Then
$$ \left| S_{N_k-1} - S_{N_{k-1}-1} \right|
= \sum_{n = N_{k-1}}^{N_k - 1} \frac{1}{n}
\geq \int_{N_{k-1}}^{N_k} \frac{\mathrm{d}x}{x}
= \log N_k - \log N_{k-1} \xrightarrow[k\to\infty]{} \log e = 1, $$
and therefore $S_m$ does not converge.
