Convergence of an alternating harmonic series Consider the series $$\sum_{n=1}^\infty c_n \cdot \tfrac 1n$$ where $c_n$ is either $-1$ or $1$. In my case I have
$$c_n = \begin{cases} 1&; \lceil np \rceil - \lceil (n-1)p \rceil = 1 \\ -1 &; \lceil np \rceil - \lceil (n-1)p \rceil = 0 \end{cases}$$
with $p\in(0,1)$.
My question: For which $p$ does the series converges? I know that the series converges for $p=\tfrac 12$ because of the alternating series test. What about the cases $p \neq \tfrac 12$?
 A: Among $m$ consequtive indices $n+1,n+2,\ldots,n+m$ there are $\lceil (n+m)p\rceil-\lceil np\rceil$ positive summands, which is between $mp-1$ and $mp+1$. Hence 
$$\begin{align}\sum_{k=n+1}^{n+m}c_k\cdot\frac 1k&>(mp-1)\cdot \frac1{n+m}-(m-(mp+1))\frac1{n+1}\\&\sim((2p-1)m-2)\frac 1n \quad \text {as $n\to\infty$} \end{align}$$
Hence for $p>\frac12$, we can pick $m$ large enough to make $((2p-1)m-2)>1$, say, and then see that the orignal series diverges.
The same arument can be applied to the case $p<\frac 12$ using
$$\begin{align}\sum_{k=n+1}^{n+m}c_k\cdot\frac 1k&<(mp+1)\cdot \frac1{n+1}-(m-(mp-1))\frac1{n+m}\\&\sim((2p-1)m+2)\frac 1n \quad \text {as $n\to\infty$} \end{align}$$
A: The alternating series test is just a special case of Dirichlet's test.
In fact, if $p\neq\frac{1}{2}$, for any $n$ big enough we have:
$$ |C_n|=\left|\sum_{k=1}^{n}c_k\right|\geq \alpha\cdot n \tag{1}$$
for some positive constant $\alpha$, hence by applying summation by parts we get that the original series is divergent by comparison with the harmonic series.
A: i think you have an interesting question here, but your definition of the $c_n$ is not  the best way to ask it. to show why i constructed a simple numerical example, which i will let stand as an illustration although it is superseded by Hagen von Eitzen's excellent analytical treatment of the general case where $p$ is rational
suppose $p=\frac35$. then for $n=0,1,2...$ you have $np= 0,\frac35,\frac65,\frac95,\frac{12}5,3,\frac{18}5,\frac{21}5,\frac{24}5,\frac{27}5,6,\frac{33}5,\frac{36}5,\frac{39}5,\frac{42}5...$, giving the sequence of ceiling function values: $0,1,2,2,3,3,4,5,5,6,6,7,8,8,9,9,10,11,...$ with the $c_n$ sequence (for $n \gt 0$) $1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,...$. the periodic occurrence of the subsequence $1,1$ means that there will be a preponderance of $+1$ over $-1$.
however, we might modify your proposal slightly, along the following lines:
for $c \in (0,1)$ define $c_n= (-1)^{b_n(c)}$ where $b_n(c)$ signifies the $n^{th}$ binary digit of $c$. now define:
$$
C = \{c: \sum_{n=1}^\infty \frac{c_n}n \quad \text{converges}\}
$$
the question  now is to characterize the set $C$. for example, it is trivial that if $x \in C$ then $1-x \in C$ and that if $G_2$ is the subgroup of $\mathbb{Q}/\mathbb{Z}$ generated by elements of the form $\frac1{2^k}$ then $C
 \cap G_2 = \varnothing$.
slightly less trivially we might try to prove that if $x=\frac{p}q$ with $q$ odd, then $x \in C $ if and only if the number of $1$'s matches the number of $0's$  in the finite sequence whose repetition makes up $x$. thus, in particular, if the period of $x$ is odd, then necessarily $x \not \in C$. relevant here is the observation that for a prime $q$ the period of the binary representation of $\frac1{q}$ is the smallest $n$ for which $q | 2^n-1$
it is again trivial that if $x \in C$ then $x+G_2\mod 1 \subset C$. also note that the elements of $G_2$ each have $2$ binary representations, neither of which belongs to $C$.
when $x$ is irrational more subtle considerations come into play. we evidently require a condition which balances the two digits in the long run. irrationals normal in base $2$ are in some sense balanced, but normality requires arbitrarily long sequences of the same digit, so it is at least superficially interesting to wonder whether normal numbers are in $C$. one might also ask whether $C$ is Lebesgue measurable.
