The sum of n terms of the sequence is used to calculate the sum of all terms up to nth term. The formula is:
Sn = n/2 [2a1 +(n-1)d]