Calculating common difference, specific terms, and sum of an AP