Sum of arithmetic and geometric series