need help for proof of $\sum_{i=1}^{n} \left(3 \cdot (\frac{1}{2})^{i-1} +2 \, i \right)$ So I'm asked to start with:
$$\sum_{i=1}^{n} \left(3 \cdot (\frac{1}{2})^{i-1}  +2 \, i \right)$$
My notes say to start by taking out the 3, use i-1 and make it multiply by $\frac{1}{2}$, and then transforming the last part by taking out the 2:
$$3 \cdot \sum_{i=1}^{n} (\frac{1}{2})^{i-1} \cdot \frac{1}{2} +2\sum_{i=1}^{n} i$$
then I got:
$$\frac{3}{2}\sum_{i=1}^{n} (\frac{1}{2})^{i-1} + 2 \times \frac{n(n+1)}2$$
then:
$$\frac{3}{2} \times \frac{1-\left(\frac{1}{2}\right)^n}{1-\frac{1}{2}} + n \times ( n + 1 ) $$
evaluates to:
$$\frac{3}{2} \times 2 \times \left(1-(\frac{1}{2})^n\right)$$
finally:
$$3[1-(\frac{1}{2})^n] + n (n+1)$$
Can someone step me through this? I don't understand going from the initial problem to the 1st step, pulling out the 3 and i-1.
 A: hint
$$S (x)=\sum_{i=1}^n3x^{i-1}=3\frac {x^n-1}{x-1} $$
$$\sum_{i=1}^n 2i=2 (1+2+3+... n)=2\frac {n (n+1)}{2} $$
A: Recall the following properties of finite sums, for some $n < m$ and $C$ is some constant:
$$\sum_{i=n}^{m} (a_i + b_i) = \sum_{i=n}^{m} a_i + \sum_{i=n}^{m} b_i$$
$$\sum_{i=n}^{m} C \times a_i = C \times \sum_{i=n}^{m} a_i$$
and the following special sums: (for $a \neq 1$)
$$\sum_{i=1}^{n-1} r^{i-1} = \frac{1 - r^{n}}{1 - r}$$
$$\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$$
Note that the third equation starts at $1$ and is of exactly that form. That's really important, since otherwise the formula is a little more complicated.
The first rule is basically associativity and commutativity of addition. For example:
$$\sum_{i=1}^3 (a_i + b_i) = (a_1 + b_1) + (a_2 + b_2) + (a_3 + b_3) = (a_1 + a_2 + a_3) + (b_1 + b_2 + b_3) = \sum_{i=1}^3a_i + \sum_{i=1}^3 b_i$$
The second rule is the distributive property:
$$\sum_{i=1}^{3}5 \cdot a_i = 5\cdot a_1 + 5\cdot a_2 + 5\cdot a_3 = 5\cdot (a_1 + a_2 + a_3) = 5 \cdot \sum_{i=1}^3a_i.$$

Ok, so the way this goes is this:
$$\sum_{i=1}^n \left(\left(\frac{1}{2}\right)^i \times 3 + 2i\right)$$
So, since this is a sum, we break it into two sums following the first rule:
$$\sum_{i=1}^n \left(\frac{1}{2}\right)^{i-1} \times 3 + \sum_{i=1}^{n} 2i.$$
Following the second rule to both series with the constants $3$ and $2$, we get:
$$3 \times \sum_{i=1}^n \left(\frac{1}{2}\right)^{i-1}  + 2 \times \sum_{i=1}^{n}i.$$
Applying the last formula to the right sum we get
$$3 \times \sum_{i=1}^n \left(\frac{1}{2}\right)^{i-1}  + 2 \times \frac{n(n+1)}{2}
= 3 \times \left(\frac{1 - (0.5)^n}{1 - 0.5} \right) + 2 \times \frac{n(n+1)}{2},$$ which is what you got, except that factor or $1/2$. You can then complete the rest of the stuff.
Note: If the index is indeed $i-1$, then you should not have the $\frac{1}{2}$ outside the series which you pick up on your third line.
Note: the equations: $$\sum_{i=1}^{n} r^{i-1} = \frac{1-r^n}{1-r} = \sum_{i=0}^{n-1} r^{i}$$ 
are the same. The equation for the geometric series must be one of these forms t apply this formula.
A: You somehow converted
$n(n+1)$
to $n+(n+1)$.
