GeomSn.Rd
A geometric sequence is a sequence, such that each term is given by a multiple of q of the previous one. A geometric series consists out of the sum of all former values of a geometric sequence..
GeomSn(a1, q, n)
the sum as numeric value
GeomSn(a1=3, q=2, n=5)
#> [1] 189
# calculates the sum of the first 5 elements of the sequence
(gseq <- 3 * (2^(0:5)))
#> [1] 3 6 12 24 48 96
sum(gseq)
#> [1] 189
GeomSn(a1=3, q=2, n=0:5)
#> [1] 3 9 21 45 93 189