Newtons method using Y-combinator
Stern-Brocot sequence [A002487]