Recently, I have found this problem:
Find two natural numbers $a,b$ such that $a+b$ is minimum and: $$\frac{a}{b}=0.2017...$$ where $...$ means that there are other decimal digits (periodic or not) that we don't know.
In order to solve this problem, I started considering that the generating fraction of a decimal periodic number of the form $A,B$ is given by: $$\frac{N}{D}=\frac{AB-B}{10^b-1}$$ where $AB$ is not the product of $A$ and $B$, but the number formed by their union and $b$ is the number of periodic digits.
If we consider, also, the anti-period (numbers of the form $A,BC$), the formula becomes: $$\frac{N}{D}=\frac{ABC-AB}{10^b(10^c-1)}$$ where, again, $ABC$ and $AB$ don't denote the product and $c$ is the number of digits of the period.
In this second case, the reasonement becomes more difficult because $2017$ can be entirely the antiperiod and the periodic digits aren't known. So, how can we go on?
In terms of continued fractions $$ 0.2017 = [0; 4, 1, \color{red}{22}, 1, 2, 1, 2, 3]$$ whose convergents are given by $$\frac{1}{4},\frac{1}{5},\frac{23}{114},\frac{24}{119},\frac{71}{352},\frac{95}{471},\frac{261}{1294},\frac{878}{4353}$$ where the third convergent already works: $$ \frac{23}{114}=\color{green}{0.2017}54385964912281\ldots$$ This is the way to go for similar problems, since the properties of continued fractions ensure that if $\frac{p_n}{q_n}$ is a convergent of $\alpha$ then $\left|\alpha-\frac{p_n}{q_n}\right|\leq\frac{1}{q_n^2}$ and $\frac{p_n}{q_n}$ approximates $\alpha$ from above or below according to the parity of $n$. As an alternative we may consider the fractional parts of $q\cdot 0.2017$ and check the smallest value of $q$ which grants a fractional part very close to $1$. It is indeed $q=114$.
Fractional parts of $0.2017 q$ for $q\in[1,114]$.
As a side note, $0.2017$ has an accurate rational approximation with a small denominator since the fourth term of the continued fraction is rather large. The constant $\pi$ shows the same behaviour: $$ \pi=[3, 7, 15, 1, \color{red}{292}, 1, 1, 1, 2, 1, 3, 1, 14,\ldots] $$ leading to the well-known Chinese approximation $\pi\approx\frac{355}{113}=[3;7,16]$ with an absolute error $<3\cdot 10^{-7}$ and the terrifying $\pi\approx\frac{103993}{33102}=[3;7,15,1,292]$ with an absolute error $<6\cdot 10^{-10}$.