<s>[INST] Infinite Geometric Series Issue i have came across a series, i am trying to find its sum knowing the fact that, if it converges and its common ratio ex. r is: -1 < r < 1, then i can use the specified formula $\frac{a}{1-r}$ , which specifically means first term of series over 1 minus common ratio
here is the series 
$\sum_{n=1}^{\infty}\frac{2n-1}{2^n}$
i manipulated it this way to prove its convergence: $\sum_{n=1}^{\infty}\frac{2n-1}{2^n}=\sum_{n=1}^{\infty}(2n-1)\frac{1}{2^n}=\sum_{n=1}^{\infty}(2n-1)\left(\frac{1}{2}\right)^n$
$\frac{a}{1-r}=\frac{\frac{1}{2}}{1-\frac{1}{2}}=\frac{\frac{1}{2}}{\frac{1}{2}}=1$
using it i get the result 1, which actually should be 3
 [/INST] Since you know it converges, let $S=\sum_{n=1}^\infty\frac{2n-1}{2^n}$. Then we have
$$\begin{align}
S &=\frac{1}{2}+\frac{3}{4}+\frac{5}{8}+\frac{7}{16}+\cdots&\text{so}\\
\frac{1}{2}S&=\phantom{\frac{1}{2}}+\frac{1}{4}+\frac{3}{8}+\frac{5}{16}+\cdots&\text{subtracting, we get}\\
S-\frac{1}{2}S&=\frac{1}{2}+\frac{2}{4}+\frac{2}{8}+\frac{2}{16}+\cdots&\text{so}\\
S-\frac{1}{2}S+\frac{1}{2}&=\frac{2}{2}+\frac{2}{4}+\frac{2}{8}+\frac{2}{16}+\cdots&\text{so}\\
 &=1+\frac{1}{2}+\frac{1}{4}+\frac{1}{8}+\frac{1}{16}+\cdots = 2
\end{align}$$
and thus we have
$$
\frac{1}{2}S+\frac{1}{2}=2
$$
from which we can conclude that $S=3$.
This idiom, suitably manipulating a series as a linear combination leading to known sums, is quite often handy.
</s>