Common Difference and Term Calculation