Calculate the nth term and the sum of the first n terms of an arithmetic sequence given the first term and common difference.
Formula
aₙ = a₁ + (n−1)d, Sₙ = (n/2)(2a₁ + (n−1)d)