How to prove $\sum_{k=1}^\infty \frac{2^k a^{2^k}}{1+a^{2^k}}=\frac{a}{1-a}$ for $-1How to prove $$\sum_{k=1}^\infty \frac{2^k a^{2^k}}{1+a^{2^k}}=\frac{a}{1-a}$$ for $-1<a<1$?
It gives a hint: $2^{k+1}-1=1+2+\cdots+2^k$. How can we use this hint to cancel some terms?

Here is a brutal-force computation: Expand everything and group according to the exponent of $a$.
$$
\sum_{k=0}^{\infty} \frac{2^k a^{2^k}}{1+a^{2^k}}
= \sum_{k=0}^{\infty} 2^k \sum_{j=1}^{\infty} (-1)^{j-1} a^{j \cdot 2^k}
= \sum_{n=1}^{\infty} \left( \sum_{(j,k) \ : \ j \cdot 2^k = n} (-1)^{j-1} 2^k \right) a^{n}.
$$
Now write $n = m \cdot 2^r$, where $m$ is odd and $r \geq 0$. Then


*

*If $0 \leq k < r$, then $j = m \cdot 2^{r-k}$ is even and hence $(-1)^{j-1} = -1$.

*If $k = r$, then $j = m$ is odd and hence $(-1)^{j-1} = 1$.
So we have
$$ \sum_{(j,k) \ : \ j \cdot 2^k = n} (-1)^{j-1} 2^k
= 2^r - \sum_{j=0}^{r-1} 2^j
= 1 $$
and hence
$$
\sum_{k=0}^{\infty} \frac{2^k a^{2^k}}{1+a^{2^k}}
= \sum_{n=1}^{\infty} a^n
= \frac{a}{1-a}.
$$
