In two previous problems (Closed expression for sum $\sum_{k=1}^{\infty} (-1)^{k+1}\frac{\left\lfloor \sqrt{k}\right\rfloor}{k}$ and Closed expression for sum $\sum_{k = 1}^{\infty} \frac{\left\lfloor \sqrt{k} \right \rfloor}{k^2}$) the infinite sums contained the floor function (of a square root) in the numerator.
Here we ask, in a simple example, what happens if the floor function is in the denominator.
Question: what is the closed form of $\sum _{k=1}^{\infty } \frac{(-1)^{k+1}}{\left\lfloor \sqrt{k}\right\rfloor }$
For any $k \geq 1$, we can uniquely write $k=n^2+\ell$, with $0\leq \ell \leq 2n$. Then, $\lfloor \sqrt{k}\rfloor = n$, so that $$\begin{align} \sum_{k=1}^\infty \frac{(-1)^{k+1}}{\lfloor \sqrt{k}\rfloor} &= \sum_{n=1}^\infty\sum_{\ell=0}^{2n} \frac{(-1)^{n^2+\ell+1}}{n} = -\sum_{n=1}^\infty \frac{(-1)^{n^2}}{n} \sum_{\ell=0}^{2n} (-1)^{\ell}\\ &= -\sum_{n=1}^\infty \frac{(-1)^{n}}{n} \sum_{\ell=0}^{2n} (-1)^{\ell} = -\sum_{n=1}^\infty \frac{(-1)^{n}}{n} \end{align}$$ since $(-1)^{n^2}=(-1)^n$ and $\sum_{\ell=0}^{2n} (-1)^{\ell}=1$ for all $n$.
It follows that $$ \sum_{k=1}^\infty \frac{(-1)^{k+1}}{\lfloor \sqrt{k}\rfloor} = -\sum_{n=1}^\infty \frac{(-1)^{n}}{n} = \boxed{\log 2} $$