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?

$$\frac12+\frac34+\ldots+\frac{2n-1}{2^n}=\left(1-\frac12\right)+\left(1-\frac14\right)+\left(\frac34-\frac18\right)+\ldots\left(\frac n{2^{n-1}}-\frac1{2^n}\right)=$$
$$1+1+\frac34+\ldots+\frac n{2^{n-1}}-\frac12-\frac14-\ldots-\frac1{2^n}\xrightarrow[n\to\infty]{}$$
$$\to\sum_{k=1}^\infty\frac k{2^{k-1}}-\sum_{k=1}^\infty\frac1{2^k}$$
Taking into account that for $\;|x|<1\;$ we have
$$\frac1{1-x}=\sum_{n=0}^\infty x^n\implies\frac1{(1-x)^2}=\sum_{n=1}^\infty nx^{n-1}$$
Substitute $\;x=\cfrac12\;$ above , one in each sum, and get:
$$\sum_{n=1}^\infty\frac n{2^{n-1}}-\sum_{n=1}^\infty\frac1{2^n}=\frac1{\left(1-\frac12\right)^2}-\left(\frac1{1-\frac12}-1\right)=4-(2-1)=3$$
and your answer is correct.
