Compute the pair numerator/denominator for iteration n.
Perform eventual clean-up operations (must be implemented by subclass when needed).