<s>[INST] Does this series $\sum_{i=0}^n \frac{4}{3^n}$ diverge or converge? I a newbie to series, and I have not done too much yet. I have an exercise where I have basically to say if some series are convergent or divergent. If convergent, determine (and prove) the sum of the series.
This is the first series:
$$\sum_{i=0}^n \frac{4}{3^i}$$
I have heard about the ratio test, so I decided to try to apply it in this case to see if the series is or not convergent.
The ratio test is basically defined like this:
$$L = \lim{\left|\frac{a_{n+1}}{a_n}\right|}$$
Where $a_n$ is in this case $\frac{4}{3^n}$ and $a_{n+1}$ is consequently $\frac{4}{3^{n+1}}$. Thus, we have:
$$L = \lim{\left|\frac{\frac{4}{3^{n+1}}}{\frac{4}{3^n}}\right|} = \lim{\left|\frac{4 \cdot 3^n}{3^{n+1} \cdot 4}\right|} = \lim{\left|\frac{3^n}{3^{n+1}}\right|} = \lim{\left|\frac{3^n}{3^n\cdot 3}\right|} = \lim{\left|\frac{1}{3}\right|} = \frac{1}{3} < 1$$
From the ratio test, we know if $L< 1$, then the series converges.
Now, I need to find the sum. I have followed a video which explain how to find the sum using the ratio, which sincerely I have not understand well what it is. Can you explain a general rule to find the ratio, and what exactly is it?
Ok. So, following the same process done during the video, I have:
$$\sum_{i=0}^n \frac{4}{3^n} = 4 \sum_{i=0}^n \frac{1}{3^n} = 4 \sum_{i=0}^n \left(\frac{1}{3}\right)^n$$
Apparently, our ratio $r$ is $\frac{1}{3}$.
Now, to find the sum of the series, he uses a formula:
$$\frac{\text{first term}}{1 - r}$$
Where first term is the first term of the series. Can you explain where this formula comes from?
Applying that formula, we obtain:
$$\frac{\left(\frac{1}{3}\right)^0}{1 - \frac{1}{3}} = \frac{1}{1 - \frac{1}{3}} = \frac{1}{\frac{2}{3}} = \frac{3}{2}$$
I checked the sum using a online calculator, and apparently it is not $\frac{3}{2}$, so I decided to manipulate, and I thought I left a $4$ outside the series, so I multiply that $4$ by $\frac{3}{2}$, which produces $\frac{12}{2} = 6$, which is exactly the sum I found using 2 online calculators.
Now, my 3rd question is: why what I did is correct (or not correct)?
 [/INST] 
A proof that, if the left-hand-side converges:
  $$a+ar+ar^2+\dotsb=\frac a{1-r}$$

Call the sum $S$. Thus, we have $S=a+ar+ar^2+\dotsb$.
$\phantom rS=a+ar+ar^2+ar^3+\dotsb$
$rS=\phantom{a+{}}ar+ar^2+ar^3+\dotsb$ (using the distributive property)
Thus:
\begin{align}
S&=a+rS\\
S-rS&=a\\
S(1-r)&=a\\
S&=\frac a{1-r}
\end{align}
</s>