Sum of arithmetric sequence.
Use the source


Sum of geometric sequence.
Use the source