formulas
1r. R code for the sum of a geometric series.
r can NOT equal 1 using the formula, but here the R code just returns a*n.
In a Geometric Sequence each term is found by multiplying the previous term by a constant.
example call: geomsum(1,2,5) #sum {1,2,4,8,16}
geomsum(a,r,n) where
a = (the first term)
r = (the "common ratio")
n = number of terms to sum
2r. R code for a List and the sum of a geometric series.
In a Geometric Sequence each term is found by multiplying the previous term by a constant.
example call: geomsumList(1,2,5) #sum {1,2,4,8,16}
geomsumList(a,r,n) where
a = (the first term)
r = (the "common ratio")
n = number of terms to sum