# Proving that $3^{-20}$ contains $20182019$ in the digits of its decimal expansion

I am trying to solve the following problem:

Consider the decimal representations of the numbers $$x_n=3^{-n}, \; n=1,2,3,\cdots$$. Find the length of the repeating part of the decimal expansion of $$x_n$$. And prove that the repeating part of the decimal expansion of $$x_{20}$$ contains the sequence $$20182019$$.

The first part of the question is quite straightforward, without going too much in the details, we find that the length of the repeating decimal expansion of $$x_n$$ can be defined as:

$$l_{n} = \begin{cases} 1 \; \text{for} \; n \leq 2 \\ 3^{n-2} \; \text{for} \; n >2. \end{cases}$$

Which gives $$l_{20}=3^{18}$$, i.e., the length of the repeating part of the decimal expansion of $$x_{20}$$ is $$3^{18}$$.

The second part of the question is the one where I am having trouble figuring what to do. If I understand the question properly, we have this number $$x_{20}$$ which has a repeating decimal expansion of length $$3^{18}$$, and we are trying to prove that a certain sequence of numbers appears in its repeating decimal expansion.

This number would look something like:

$$x_{20}= 0.\overline{a_1a_2\cdots 20182019 \cdots a_{3^{18}}}$$, with $$a_i$$ being the $$i$$-th digit of the decimal expansion.

My first thought was to multiply $$x_{20}$$ by $$10^{3^{18}}$$ in order to have the whole repeating part of the decimal expansion shifted to the integer part of $$x_{20}$$ but I quickly realised this didn't help much.

I imagine there is no general way to find if a certain "sequence" of number appears in another number (or is there?), so my guess is that the solution would be a trick working solely with this example.

Thank you for reading, any help or advice would be greatly appreciated!

Consider the base $$10^8$$ decimals. This can be read off from the base $$10$$ decimals by packing $$8$$ base $$10$$ digits into one base $$10^8$$ digit.
Then by dividing $$0.\overline{11111111}$$ by $$3^{18}$$, by your part one, it still has period $$3^{18}$$, since the period is relatively prime to $$8$$. When you calculate the base $$10^8$$ digits, you need to do divisions of the form $$10^8\times n$$ by $$3^{18} = 3,8742,0489$$, and since the period is still the largest possible, each possible remainder should occur (from $$0$$ to $$3^{18}-1$$) without repetition, and each quotient should occur (from $$00000000$$ to $$99999999$$), since $$10^8 < 3^{18}$$.
In particular, $$20182019$$ should occur.