Find and algebraic expression to compute the sum of the first n terms of the arithmetic sequence with first term f and common difference d.