TITLE: Find closed formula by changing order of summation: $\sum_{i=1}^ni3^i$
QUESTION [7 upvotes]: Working on homework for a probability and computing class, but my ability to work with summations is rusty to say the least, so I suspect this is going to turn out pretty straightforward. 
Problem asks to find a closed formula for $$\sum_{i=1}^ni3^i$$ by representing it as a double sum and changing the order of summation. I did that by following a hint from the instructor and came up with $$\sum_{k=1}^n\sum_{i=k}^n3^i,$$ but I'm not really sure what that accomplished. What's the next step? What am I looking for here?

REPLY [2 votes]: The inner sum is a geometric series. It can be expanded as follows:
$$\sum_{k=1}^n\sum_{i=k}^n3^i=\sum_{k=1}^n(\sum_{i=k}^n3^i)=\sum_{k=1}^n\frac{3^k-3^{n+1}}{1-3}=\sum_{k=1}^n\frac{3^{n+1}-3^k}{2}=\frac{n3^{n+1}}2-\frac12\sum_{k=1}^n3^k$$
The rest should be pretty straight-forward.