anemone said:
If $x,\,y$ are positive integers with $y<2014$, show that the minimal value of $\left|\dfrac{x}{y}-\dfrac{123}{2014}\right|$ is $\dfrac{1}{3792362}$.
[sp]First, factorise those numbers to find that $123 = 3\times41$, $2014 = 2\times19\times53$ and $3792362 = 1883\times2014$.
So the problem is to show that $\left|\dfrac{x}{y}-\dfrac{123}{2014}\right| \geqslant \dfrac{1}{1883\times 2014}$ whenever $y<2014$, and that equality can be achieved.
Let's look first at whether equality can be achieved, so that $\left|\dfrac{x}{y}-\dfrac{123}{2014}\right| =\dfrac{1}{1883\times 2014}$. That is equivalent to $\bigl|\,2014x - 123y\,\bigr| = \dfrac y{1883}.$
Since $123$ and $2014$ are co-prime, the left side of that equation can never be zero when $y<2014$. But it is an integer, so the smallest value it can take is $1$. A routine application of
Euclid's algorithm shows that for $y<2014$ this can only happen if
either (i) $x=8$ and $y=131$
or (ii) $x = 115$ and $y = 1883$. In case (i), $\bigl|\,2014x - 123y\,\bigr|$ is much larger than $\dfrac y{1883}.$ But in case (ii), equality occurs.
For any other values of $x$ and $y$ (with $y<2014$), we must have $\bigl|\,2014x - 123y\,\bigr| \geqslant2$, and $\dfrac y{1883} <2$. Therefore $\bigl|2014x - 123y\bigr| > \dfrac y{1883}$ and consequently $\left|\dfrac{x}{y}-\dfrac{123}{2014}\right| > \dfrac{1}{3792362}$.
Therefore $\dfrac{1}{3792362}$ is the minimal value, and it only occurs when $x = 115$ and $y = 1883$.[/sp]