Returns the nth value from the Stern-Brocot sequence.