Calculate $ \lim\limits_{n \to \infty} \sum\limits_{k=0}^n \frac{2^{k-1}}{a^{2k-1}+1} $ 
Let $a \in (1, \infty)$. Calculate $$ \lim\limits_{n \to \infty} \sum_{k=0}^n \frac{2^{k-1}}{a^{2k-1}+1} $$

Here's what I tried:
Let $ x_n = \sum_{k=0}^n \frac{2^{k-1}}{a^{2k-1}+1} $. Let $a_n, b_n$ so that $a_n < x_n < b_n$. If $a_n \to l, b_n \to l$ with $ l \in \mathbb{R}$ then $x_n \to l$. I tried saying that $$ {{1+2+2^2+\dots+2^{n-1}}\over{a^{2n-1}+1}} < x_n < {{1+2+2^2+\dots+2^{n-1}}\over{a+1}} $$ but the limit of the lefthand-side  fraction is $0$ and the one for the righthand-side is $\infty$. How can I solve this?
 A: With equivalents:
$$\frac{2^{k-1}}{a^{2k-1}+1}\sim_\infty\frac{2^{k-1}}{a^{2k-1}}=\frac a2\biggl(\frac2{a^2}\biggr)^k,$$
and  the latter converges if and only if $\dfrac2{a^2}<1\iff (1<)\, a<\sqrt2$.
A: Let $a>\sqrt2$, we have that
\begin{align}
\sum_{k=0}^{\infty} \frac{2^{k-1}}{a^{2k-1}+1}&=\frac a{2a+2}+\sum_{k=0}^{\infty} \frac{2^k}{a^{2k+1}}(1+a^{-1-2k})^{-1}\\
&=\frac a{2a+2}+\sum_{k=0}^{\infty} \frac{2^k}{a^{2k+1}}\sum_{n=0}^{\infty}(-a^{-1-2k})^n
\end{align}
Applying Fubini's theorem,
\begin{align}
\sum_{k=0}^{\infty} \frac{2^{k-1}}{a^{2k-1}+1}
&=\frac a{2a+2}+\sum_{n=0}^{\infty}\frac{(-1)^n}{a^{n+1}}\sum_{k=0}^{\infty}(\frac2{a^{2n+2}})^k\\
&=\frac a{2a+2}+\sum_{n=0}^{\infty}\frac{(-1)^n}{a^{n+1}}(1-\frac2{a^{2n+2}})^{-1}\\
&=\frac a{2a+2}+\sum_{n=0}^{\infty}\frac{(-1)^n}{a^{n+1}-\frac2{a^{n+1}}}\\
&=\frac a{2a+2}-\sum_{n=1}^{\infty}(-1)^n\frac{a^n}{a^{2n}-2}\tag{*}\label{*}\\
&=\frac a{2a+2}-\sum_{n=1}^{\infty}\frac{(-1)^n}{a^n}(1+\frac2{a^{2n}-2})\\
&=\frac a{2a+2}+\frac1{a+1}-\sum_{n=1}^{\infty}\frac{(-1)^n}{a^n}\frac2{a^{2n}-2}\\
&=\frac 1 2+\frac1 {2a+2}-\sum_{n=1}^{\infty}\frac{(-1)^n}{a^n}\frac2{a^{2n}-2}
\end{align}
This formula can give an approximation while $a\to\infty$.
We can see that the sum $\to \infty$ when $a\to \sqrt2_+$ :
$$\sum_{k=0}^{\infty} \frac{2^{k-1}}{a^{2k-1}+1}=\frac 1 2+\frac1 {2a+2}+\bbox[5px,border:2px solid red]{\frac2{a(a^2-2)}}-\sum_{n=2}^{\infty}\frac{(-1)^n}{a^n}\frac2{a^{2n}-2}$$
which gives :
$$\sum_{k=0}^{\infty} \frac{2^{k-1}}{a^{2k-1}+1}\operatorname*{\sim}_{a\to\sqrt2_+}\frac1{2(a-\sqrt2)}$$

More exactly, from $\eqref{*}$,
\begin{align}
\sum_{k=0}^{\infty} \frac{2^{k-1}}{a^{2k-1}+1}
&=\frac a{2a+2}-\frac12\sum_{n=1}^{\infty}\frac{(-1)^n}{a^n+\sqrt2}-\frac12\sum_{n=1}^{\infty}\frac{(-1)^n}{a^n-\sqrt2}\\
&=\frac a{2a+2}+\frac12\sum_{n=1}^{\infty}\frac{1}{a^n+\sqrt2}+\frac12\sum_{n=1}^{\infty}\frac{1}{a^n-\sqrt2}-\sum_{n=1}^{\infty}\frac{1}{a^{2n}+\sqrt2}-\sum_{n=1}^{\infty}\frac{1}{a^{2n}-\sqrt2}
\end{align}
One can then express this ugly sum using some uglier q-psi functions.
