Computing geometric series in R
<p>I would like to compute:</p>

<pre><code>$\sum_{j=1}^n r^j$ for $n=10, 20, 30, 40$, where $r=1.08$
</code></pre>

<p><a href="http://quicklatex.com/cache3/76/ql_b64b957d43a0d6a93418cb18eb752576_l3.png" rel="nofollow noreferrer">http://quicklatex.com/cache3/76/ql_b64b957d43a0d6a93418cb18eb752576_l3.png</a></p>

<p>and to see the answers as a vector. I'm working with R; could anyone is able to explain to me how to do this?</p>