Find the sum of a finite geometric series