Partial sum of arithmetic sequence