The Saros is the time period for the draconic month ($T_d$ = 27.212220815 days), synodic month ($T_s$ = 29.530588861 days) and anomalistic month ($T_a$ = 27.554549886 days) to approximately match. More specifically, it states that $$242 T_d \approx 223T_s \approx 239 T_a$$ My question is: Is there a non brute force way to derive such integer approximations?
Consider a simpler case, in which we want to get integer approximations for only 2 periods. Take the synodic month and the tropical year ($T_y$ = 365.24219 days). Therefore, $$aT_s=bT_y$$ $$\frac{a}{b}=\frac{T_y}{T_s}$$ To derive increasingly accurate approximations, one can use the continued fraction expansion for $\frac{T_y}{T_s}=12.368266400619...$, which is (in the WolframAlpha notation) $$12.368266400619=[12; 2, 1, 2, 1, 1, 17, 3, 196, 1, 4, 1, 1, 2, 2,...]$$ From which it can be seen that truncating just before the 17 yields a good approximation $$12.368266400619\approx[12; 2, 1, 2, 1, 1]=\frac{235}{19}$$ Therefore, $$235T_s\approx19T_y$$ Which is known as the metonic cycle.
However, I cannot see a good way to extend this method for 3 periods and beyond.