Does $\sum_{n=1}^{\infty}\frac{\cos\left(\frac{n\pi}{2}\right)}{\sqrt{n}}$ converge? Does the following series converge?

$$\sum_{n=1}^{\infty}\frac{\cos\left({\frac{n\pi}{2}}\right)}{\sqrt{n}}$$

The $\cos$ function:


*

*alternates between (-1) and 1 for every $n$ that is even. (for a general expression see this)

*equal to zero for every $n$ that is odd.


Thus the sequence of the given series is actually alternating between positive and negative:
$$
\sum_{n=1}^{\infty}\frac{\cos\left({\frac{n\pi}{2}}\right)}{\sqrt{n}} = 0 + \frac{-1}{\sqrt{2}} + 0 + \frac{1}{\sqrt{4}} + 0 + \frac{-1}{\sqrt{6}} + \cdots + \frac{i^{n} (1 + (-1)^{n})}{2}\cdot\frac{1}{\sqrt{n}}
$$
Would it be valid to use the Leibniz Test in order to say that the given series converge?
Do you know of a different method to prove whether the given series converges/diverges? Without using the complex number $i$.
 A: In the Leibniz Test, for the convergence of $\sum(-1)^n a_n$ is required $a_n\ge 0$, $a_n\to 0$ and $a_{n+1}\le a_n$, so take only the even terms. And the sum isn't zero.
A: Dor, you can write the following $$\displaystyle a_n=\cos\left (\frac{\pi n}{2}\right)=\begin{cases} 0, & \mathrm{n \ odd} \\ (-1)^{\large \frac{n}{2}}, & \mathrm{n \ even}\end{cases}$$
Hence, $\displaystyle a_{2k-1}=0 \ , \ a_{2k}=(-1)^k$.
Assume that the series does converge, then we can write $$\displaystyle \sum_{n=1}^{\infty} a_n=\underbrace{\sum_{k=1}^{\infty}a_{2k+1}\cdot{\frac{1}{\sqrt{2k+1}}}}_{=0}+\sum_{k=1}^{\infty}a_{2k}\cdot{\frac{1}{\sqrt{2k}}}=0+\sum_{k=1}^{\infty}(-1)^k\cdot{\frac{1}{\sqrt{2k}}}$$
Look at the sequence $a_k=\frac{1}{\sqrt{2k}}$. It is monotonically decreasing to $0$, thus, by Leibniz criterion we can write that $\displaystyle \sum_{k=1}^{\infty}(-1)^k\cdot{\frac{1}{\sqrt{2k}}}$ converges, therfore $\displaystyle \sum_{n=1}^{\infty}\frac{\cos\left(\frac{\pi n}{2}\right)}{\sqrt{n}}$ converges.
A: $\frac{1}{\sqrt n}\downarrow\to0$and we have a constant $M$make$$
\left|\sum_{k=1}^{n}\cos\frac{k\pi}{2}\right|\leq M
$$
so according to Dirchlet Thm,the series is converge.
A: Is your series maybe equal to
$\sum_{n=1}^{\infty} \frac{(-1)^n}{\sqrt{2n}}$ (as you pointed out indirectly)?
If so, note that the nth term of the new series is decreasing and alternating as n increases.
Edit: From where does the i come?
A: You can look at the partial sums $s_{2m} = \sum_{k=1}^{2m}\cos(k\pi/2)/\!\sqrt{k}$ and $s_{2m+1}$. Use the equality
$$ \sum_{k=1}^{2m} a_k = \sum_{k=1}^{m}a_{2k} + \sum_{k=1}^{m} a_{2k-1}. $$
Prove that $s_{2m}$ converges and $\lim\,(s_{2m+1}-s_{2m})=0$. This is enough to show that $\lim s_{2m+1}$ exists and equals $\lim s_{2m}$. Although you cannot use $\lim(a_n \pm b_n) = \lim a_n \pm \lim b_n$, since we don't know if $\lim s_{2m+1}$ exists, you can add $\lim s_{2m}$ to both sides of $\lim\,(s_{2m+1}-s_{2m})=0$ to get $\lim s_{2m}=\lim s_{2m+1}$. Therefore, $s_{m}$ converges (why?).
