parmenides51 wrote:
Alina knows how to twist a periodic decimal fraction in the following way: she finds the minimum preperiod of the fraction, then takes the number that makes up the period and rearranges the last one in it digit to the beginning of the number. For example, from the fraction, $0.123(56708)$ she will get $0.123(85670)$. What fraction will Alina get from fraction $\frac{503}{2022}$ ?
Writing a rational $\in(0,1)$ as $u=\overbrace{<...m...>}^{n\text{ digits}}\left(\overbrace{<...k...>}^{p\text{ digits}}\right)$, we have :
$u=\frac{m(10^p-1)+k}{10^n(10^p-1)}$
And so we are looking for the smallest $n,p$ such that $2022|10^n(10^p-1)$
Since $2022=2\times 3\times 337$ with $337$ prime, we immediately get $n=1$ and $p=336$
So $10\frac{503}{2022}=m+\frac k{10^{336}-1}$ which gives $m=2$ and $\frac{493}{1011}=\frac k{10^{336}-1}$
And so $k=493\frac{10^{336}-1}{1011}$ and so rightmost digit of $k$ is rightmost digit of $3\times 9$ and so is $7$
So $\frac{503}{2022}=0.2(a....b7)$ and searched result is $x=0.2(7a....b)$ And so $100x-27 =10\frac{503}{2022}-2$ $=\frac{493}{1011}$
And so $x=\boxed{\frac{2779}{10110}}$