From the first term and the common difference, finds the nth term a + (n−1)d of an arithmetic sequence and the sum of the first n terms.