Finding the value of a term in an arithmetic sequence