Prove that $\sum_{n=1}^{\infty} \frac{(-1)^{[\sqrt n]}}{n}$ converges where $[x]$ is the largest integer that is less than or equal to x.
Suggestion: Use the inequality $\frac{1}{l+1}< \int_{l}^{l+1} \frac{1}{x}dx <\frac{1}{l}$.
I solved this question with Dirichlet test. https://en.wikipedia.org/wiki/Dirichlet%27s_test
Let $a_{n}=\frac{1}{n}$. It is monotonically decreasing and approaches to zero.
and $b_{n}=(-1)^{[\sqrt n]}$ and the partial sum is bounded .
By the given DT, it $ \sum_{n=1}^{\infty}a_{n}{b_{n}$ is convergent.
Can I solve this question by this approach?
You can apply Dirichlet's test but not to $a_n= \frac1n,b_n = (-1)^{[\sqrt n]}$ (as $\sum_{n\le x}(-1)^{[\sqrt n]}$ is not bounded), look instead at $a_n = \frac1{n^{1/3}}, b_n=\frac{(-1)^{[\sqrt n]}}{n^{2/3}}$ so that the boundedness of $\sum_{n\le x} b_n$ is obvious.