how to solve arithmetic sequence problems