This does not make an awful lot of sense. I have 1/2 and 3/4. The mediant is 4/6 which is 2/3. Okay. Now I have 1/2 and 6/8. Actually, these are the same numbers, it is just a different representation of 3/4. Now the mediant is 7/10..... Uhm.....
Then your next interval would be (1/2, 2/3) or (2/3, 3/4) depending on whether s > 2/3 or s < 2/3, where s is your search term.