Sum of an arithmetic sequence