Sum of terms of an Arithmetic Progression