Arithmetic progression, its nth term and sum of n terms