<s>[INST] Smallest value of $b$ when $0<\left\lvert \frac{a}{b}-\frac{3}{5}\right\rvert\leq\frac{1}{150}$ Problem
For positive integers $a$ and $b$, $$0<\left\lvert \dfrac{a}{b}-\dfrac{3}{5}\right\rvert\leq\dfrac{1}{150}$$
What is the smallest possible value of $b$? (BdMO 2021 Junior P10)
My approach
If $\dfrac{a}{b}>\dfrac{3}{5}$, then $\dfrac{a}{b} \leq \dfrac{91}{150}$ and if $\dfrac{a}{b}<\dfrac{3}{5}$, then $\dfrac{a}{b} \geq \dfrac{89}{150}$.
Hence the maximum value of $\dfrac{a}{b}$ is $\dfrac{91}{150}$. And $\dfrac{a}{b}$ is maximum when $b$ is the smallest.
So, I thought $150$ would be the smallest value of $b$.
But my friend said that the smallest value of $b$ would be $32$ as $\left\lvert \dfrac{19}{32}- \dfrac{3}{5}\right\rvert= \dfrac{1}{160}$ works actually. Though he said that he found this intuitively.
So, how to solve the problem with proper procedure?
 [/INST] Once you get that $\frac{a}{b}$ is between $\frac{89}{150}$ and $\frac{91}{150}$, you may simply consider the continued fractions of these rational numbers:
$$ \frac{89}{150}=[0;1,1,2,5,1,1,2] $$
$$ \frac{91}{150}=[0;1,1,1,1,5,2,2] $$
In particular we are looking for a fraction of the form $[0;1,1,2,\alpha]$ with $\alpha > [5;1,1,2]=\frac{28}{5}$. In order to have the smallest denominator the most effective choice is just $\alpha=6$, and
$$ [0;1,1,2,6]=\frac{19}{\color{blue}{32}}.$$
</s>