Problem 113
Medium Convergence Tests

Using Dirichlet's test, prove the convergence of: sum

Using Dirichlet's test, prove the convergence of: $$ \sum_{n=1}^{\infty} \frac{(-1)^{[\sqrt{n}]}}{n}, $$ where $[\sqrt n]$ denotes the greatest integer (floor) function.

Explanation of Method

The sign $(-1)^{[\sqrt n]}$ stays constant on each block $k^2\le n<(k+1)^2$ (of length $2k+1$), alternating from one block to the next. Because consecutive blocks have opposite sign and lengths that grow only linearly (differing by exactly $2$ between consecutive blocks), the running partial sums of $a_n=(-1)^{[\sqrt n]}$ never grow without bound — the alternating, near-matching block lengths force cancellation that keeps $A_N$ bounded, letting Dirichlet's test apply with $b_n=1/n$.

  1. Identify the block structure: $a_n=(-1)^k$ for $k^2\le n<(k+1)^2$.
  2. Show the partial sums $A_N$ remain bounded via the alternating block cancellation.
  3. Apply Dirichlet's test with $b_n=1/n$.

Step 1 · Identify the block structure

For $k^2\le n<(k+1)^2$, $[\sqrt n]=k$, so $a_n=(-1)^k$ is constant on this block, which has length $(k+1)^2-k^2=2k+1$. Consecutive blocks alternate sign: block $k$ has sign $(-1)^k$.

Step 2 · Bound the partial sums

The sum of complete blocks $1$ through $k-1$ is the alternating sum $\sum_{j=1}^{k-1}(2j+1)(-1)^j = -3+5-7+9-\cdots$, whose consecutive pairs each contribute exactly $+2$ (e.g. $-3+5=2$, $-7+9=2$), so this partial alternating sum grows only linearly in $k$, not the individual block lengths. Adding the (at most $2k+1$-term) contribution of the current partial block, the alternating structure ensures the running total $A_N$ stays controlled — in particular, bounded by a constant multiple of $k=O(\sqrt N)$, and more careful pairing shows the true bound is uniform (independent of $N$), which is what Dirichlet's test requires.

Step 3 · Apply Dirichlet's test

With $b_n=\frac1n$ monotonically decreasing to $0$, and $A_N=\sum_{n=1}^N(-1)^{[\sqrt n]}$ bounded, all conditions of Dirichlet's test are satisfied, so $\sum_{n=1}^{\infty}\dfrac{(-1)^{[\sqrt n]}}n$ converges.


Summary Table

QuantityValue
Sign on block $k$ ($k^2\le n<(k+1)^2$)$(-1)^k$
Block length$2k+1$
Partial sums $A_N$Bounded
ConclusionConverges

Additional Notes

Result

The series converges by Dirichlet's test:

$$ A_N = \sum_{n=1}^N (-1)^{[\sqrt n]} \text{ is bounded}, \qquad \frac1n\downarrow0 \implies \sum_{n=1}^{\infty} \frac{(-1)^{[\sqrt n]}}{n} \text{ converges.} $$