Find terms of an arithmetic sequence