Finding common difference, first term, and number of terms