Generates a Stern-Brocot sequence of variable size