Find limit of sequence sum Let us have sum of sequence (I'm not sure how this properly called in English): $$X(n) = \frac{1}{2} + \frac{3}{4}+\frac{5}{8}+...+\frac{2n-1}{2^n}$$
We need
$$\lim_{n \to\infty }X(n)$$
I have a solution, but was unable to find right answer or solution on the internet.
My idea:
This can be represented as $$ \frac{1}{2} + \frac{1}{4} + \frac{2}{4} + \frac{3}{8}+\frac{2}{8}+\frac{5}{16} + \frac{2}{16} ... + ...$$
Which is basically 
$\frac{1}{2} + \frac{1}{2} +\frac{1}{4}+\frac{1}{8}$ - 1/2 + geometric progression + our initial sum divided by 2.
And then I thought: hey, so I can figure out one part of this sum, and second is twice smaller, and then it forms a cycle! (I suppose).
So it would be $B_1 = 1/2 + b_1/(1-1/2) = 3/2$
$$lim_{n \to\infty }X(n) = B_1/(1-1/2) = 3$$
Is this correct?

Let
\begin{align*}
f(x) &= \sum_{n=1}^{\infty} \frac{x^{2n-1}}{2^n}\\
&=\frac{x}{2}\sum_{n=0}^{\infty}\left(\frac{x^2}{2}\right)^n\\
&=\frac{x}{2-x^2}.
\end{align*}
Then
\begin{align*}
f'(x) = \frac{2+x^2}{(2-x^2)^2}.
\end{align*}
Therefore,
\begin{align*}
\lim_{n\rightarrow \infty}X(n) = f'(1)=3.
\end{align*}
