# Using https://socratic.org/questions/in-1-6-1-6666-repeating-6-is-called-repeatend-or-reptend-i-learn-from-https-en-w, how do you design a set of rational numbers { x } that have reptend with million digits?

Oct 19, 2016

See below.

#### Explanation:

Let's go a step further, and design a set that contains every rational number with a repetend with ${10}^{6}$ digits.

Warning: The following is highly generalized and contains some atypical constructions. It may be confusing for students not completely comfortable with constructing sets.

First, we want to construct the set of our repetends of length ${10}^{6}$. While we can start with the set $\left\{1 , 2 , \ldots , {10}^{{10}^{6} + 1} - 1\right\}$ which contains every natural number with at most ${10}^{6}$ digits, we would encounter a problem. Some of these repetends could be represented with smaller strings, for example $0. \overline{111. . .1} = 0. \overline{1}$, or $0. \overline{121212. . .12} = 0. \overline{12}$. To avoid this, we first define a new term.

Consider an integer $a \in \left[1 , {10}^{{10}^{6} + 1} - 1\right]$. Let ${a}_{1} {a}_{2.} . . {a}_{{10}^{6}}$ be a ${10}^{6}$ digit representation of that integer, possibly with leading $0$s if $a$ has fewer than ${10}^{6}$ digits. We will call $a$ useful if for every proper divisor $m$ of ${10}^{6}$, $a$ is not of the form ${a}_{1} {a}_{2.} . . {a}_{m} {a}_{1} {a}_{2.} . . {a}_{m} \text{ "..." } {a}_{1} {a}_{2.} . . {a}_{m}$

Now we can make our set of repetends.

Let $A = \left\{a \in \left\{1 , 2 , \ldots , {10}^{{10}^{6} + 1} - 1\right\} : a \text{ is useful}\right\}$

Next, we'll construct our set of potential nonrepeating initial decimal digits. Keeping in mind that this could also have leading $0$s, or consist entirely of $0$s, we will represent our numbers as tuples of the form $\left(k , b\right)$, where $k$ will represent the length of the string of digits, and $b$ will represent its value when evaluated as an integer. For example, the digits $00032$ would pair with the tuple $\left(5 , 32\right)$.

Let $B = \left(\mathbb{N} \cup \left\{0\right\}\right) \times \left(\mathbb{N} \cup \left\{0\right\}\right)$

Finally, let's add our integer portion to the mix. Note that unlike the fractional portions, we will account for sign here, and use $\mathbb{Z}$ instead of $\mathbb{N}$.

Let $C = A \times B \times \mathbb{Z}$. That is, $C$ is the set of $3$-tuples $\left(a , \left(k , b\right) , c\right)$ such that, $a$ is a useful integer with at most ${10}^{6}$ digits, $\left(k , b\right)$ represents a $k$-digit string of digits whose integral value is $b$, and $c$ is an integer.

Now that we have sets encompassing every possible $a , b , c$ string with the desired properties, we will put them together using the form constructed in the referenced question.

$S : = \left\{\frac{\left({10}^{k} c + b\right) \left({10}^{{10}^{6}} - 1\right) + a}{{10}^{k} \left({10}^{{10}^{6}} - 1\right)} : \left(a , \left(k , b\right) , c\right) \in C\right\}$

Then $S \subset \mathbb{Q}$ is the set of rational numbers with ${10}^{6}$ digit repetends.

Oct 19, 2016

Thanks to Sente, the theory is in his answer.

For a subset of the answer

$\left\{x\right\} = \left\{I + M + \frac{{d}_{m s d} \mathrm{dd} d \ldots \mathrm{dd} {\mathrm{dd}}_{l s d}}{9999. . .9999}\right\}$,

$I \in N$ and M a proper fraction of the form m-digit

integer/${10}^{m}$, ${d}_{m s d}$ is non-zero most significant digit. lsd

means the least significant digit..

Elucidation:

Let I =2, M =.209/1000=.209, ${d}_{l s d} = 7 \mathmr{and} {d}_{m s d} = 3$. In-

between d's are all 0..

Then.

$x = 2.209 + \frac{7000. . .0003}{9999. . .9999}$

#=2.209 7000...0003 7000...0003 7000...0003 ... ad infinitum.

Note the division by ${10}^{100001} - 1 = 9999. . .9999$.

Both numerator and denominator have the same number of sd.

Sans msd d, d's could be any $\in \left\{0 1 2 3 4 5 6 7 8 9\right\}$.