Derive the Formula for the Sum of a Finite Geometric Series code example Example: formula for finite geometric series a(1-rⁿ)/(1-r).