<s>[INST] Closed form of $\sum _{k\ge 1} \frac{(-1)^{\binom{k}{p}}}{k}$, an alternating harmonic series with the signs determined by a binomial coeffcient In a comment to Evaluating $\int_{0}^{1} \lim_{n \rightarrow \infty} \sum_{k=1}^{4n-2}(-1)^\frac{k^2+k+2}{2} x^{2k-1} dx$ for $n \in \mathbb{N}$ I proposed to study this alternating harmonic sum
$$s(p) = \sum _{k\ge 1} \frac{(-1)^{\binom{k}{p}}}{k}\tag{1}$$
where the sign of the terms is determined by a binomial coefficient.
This turned out to be interesting, and the results can be formulated in three statements:
Statement 1: the sum is convergent only if $p$ is power of $2$: $p = 2^q, q=0,1,2,...$
Statement 2: the closed expressions of $s$ for the first few values of $q$ are
$$s(1) = -\log (2)\simeq -0.693147$$
$$s(2) = \frac{\pi }{4}-\frac{\log (2)}{2}\simeq 0.438825$$
$$s(4)= \frac{\pi}{8} \left(1+2 \sqrt{2}\right) -\frac{\log (2)}{4}\simeq 1.33013 $$
$$s(8) = \frac{\pi}{16} \left(4 \sqrt{2+\sqrt{2}}+2 \sqrt{2}+1\right)  -\frac{\log (2)}{8}\simeq 2.11629$$
The next step was hard, and I did not expect to find a simple expression. But here it is
$$\begin{align}s(16) = \frac{\pi}{16} \left(4 \left(\sqrt{2-\sqrt{2+\sqrt{2}}}+\sqrt{\left(2+\sqrt{2}\right) \left(2-\sqrt{2+\sqrt{2}}\right)}\right)+\sqrt{2}+2 \sqrt{2+\sqrt{2}}+2 \sqrt{2-\sqrt{2+\sqrt{2}}}+2 \sqrt{\sqrt{2+\sqrt{2}}+2}+\frac{1}{2}\right)  -\frac{\log (2)}{16}\simeq 2.85436\end{align}$$
Statement 3: The general structure seems to be
$$s(p=2^q) =  \frac{\pi}{p}a(p)-\frac{1}{p} \log(2) \tag{2}$$
where $a(p)$ is an algebraic number composed of the number $2$.
Questions
(1) are these results known in the literature?
(2) can you derive/prove the three statements?
(3) can you give the expression $a(p)$ to extend the given range?
 [/INST] For statement 1:
Write $k = k_N2^N + k_{N-1}2^{N-1} + \cdots + k_12 + k_0$ for the binary expansion of $k$ (and similarly for $p$).  We may appeal to Lucas's theorem to show that $\binom{k}{p} \equiv 1 \pmod{2}$ if and only if for every $i$, if $p_i = 1$ then $k_i = 1$.
Now, let $1 < p < 2^q$ which is not a pure power of $2$, and let $b$ denote the number of $1$s appearing in the binary expansion of $p$, noting $b \geq 2$.  Then for every integer $N \geq 1$, there are exactly $2^{q-b}$ values of $k$ where $(N-1)2^q < k \leq N2^q$ and $\binom{k}{p} \equiv 1 \pmod{2}$.
It follows that $$\frac{1}{N2^q}\sum_{k=1}^{N2^q}k\frac{(-1)^\binom{k}{p}}{k} = \frac{1}{N2^q}\cdot N(2^q - 2\cdot 2^{q-b}) = 1 - 2^{1-b} \not\to 0 \text{ as } N\to \infty$$
and therefore by Kronecker's lemma,
$$\sum_{k=1}^\infty \frac{(-1)^\binom{k}{p}}{k}$$
doesn't converge.
</s>