# convergence of the series $\sum_{n=1}^{\infty}\frac{\left(-1\right)^{\lfloor\sqrt{n+1}\rfloor}-\left(-1\right)^{\lfloor\sqrt{n}\rfloor}}{n}$

$$\sum_{n=1}^{\infty}\frac{\left(-1\right)^{\lfloor\sqrt{n+1}\rfloor}-\left(-1\right)^{\lfloor\sqrt{n}\rfloor}}{n}$$

Im having trouble trying to determine if this series converge absolutely or conditionally. Any ideas will help. I noticed that when $$\sqrt{n+1} \in Z$$ then $$\left(-1\right)^{\lfloor\sqrt{n+1}\rfloor}-\left(-1\right)^{\lfloor\sqrt{n}\rfloor} =-2$$ or $$\left(-1\right)^{\lfloor\sqrt{n+1}\rfloor}-\left(-1\right)^{\lfloor\sqrt{n}\rfloor}=2$$

But i cant tell more then that.

• I think you can tell more than that since by what you already wrote it is clear the series cannot converge absolutely... Commented Apr 17, 2020 at 22:49
• @DonAntonio: yes, it can, because most of the terms are zero. The surviving ones decrease fast enough so the sum converges absolutely. Commented Apr 17, 2020 at 22:51
• @RossMillikan I'm referring to what the OP wrote: that the numerator is either $\;2\;$ or $\;-2\;$ ... Commented Apr 17, 2020 at 23:09
• @DonAntonio: only when $n+1$ is a perfect square, which OP represented as $\sqrt {n+1} \in \Bbb Z$, implying it is zero other times. Commented Apr 17, 2020 at 23:13

You need to turn what you noticed, which is important, into the fact that the only surviving terms have $$n+1=k^2$$, so they have $$k^2-1$$ in the denominator. Now you can use the fact that the sum of inverse squares converges.
• Im having trouble writing formal proof. I want to write this: $\sum_{n=1}^{\infty}\frac{|\left(-1\right)^{\lfloor\sqrt{n+1}\rfloor}-\left(-1\right)^{\lfloor\sqrt{n}\rfloor}|}{n}=\sum_{n=1}^{\infty}\frac{|\left(-1\right)^{\lfloor\sqrt{n+1}\rfloor}-\left(-1\right)^{\lfloor\sqrt{n}\rfloor}|}{k^{2}-1}\leq\sum_{n=1}^{\infty}\frac{2}{k^{2}}$ but im not sure how to do it correct. because in the last sum we dont have dependence on n in the term so it looks wrong. (k is the number such $k^2=\sqrt{n+1}$ Commented Apr 17, 2020 at 23:53
• I would change the sum variable to $k$. To do that you have to argue that all the terms you lose because they do not correspond to a whole number $k$ are zero. You also want to start with $k=2$ to avoid the division by $0$ which is OK because you did not have $n=0$ which would cause $k=1$. Commented Apr 18, 2020 at 0:09