# Does the decimal expansion of a rational number contain the decimal expansion of an irrational number?

Let $$s \in [0,1] \cap \mathbb{Q}$$. Take the decimal expansion of $$s$$ as $$\sum_{n=1}^\infty \frac{x_n}{10^n}$$ for a sequence $$(x_n) \subset \{0,1,...,9\}$$ that does not eventually end in a tail of 9's (implying uniqueness).

Suppose $$(x_n)$$ does not also end in a tail of 0's. Suppose $$(x_n)$$ has finitely many 0's. Let $$P_n$$ denote the $$n$$th prime number. Is $$s_p=\sum_{n=1}^\infty \frac{x_{P_n}}{10^{P_n}}$$ irrational?

It seems the decimal expansion of $$s_p$$ is supposedly 'random'. If true, it implies that pretty much every rational number "contains" the decimal expansion of an irrational number, which sorta makes sense considering the uncountability of $$\mathbb{R}-\mathbb{Q}$$. It also makes sense in that you are able to add two irrational numbers to produce a rational number.

I'll do an example. Let $$s=\frac{1}{3}=0.\bar{3}$$. Then $$s_p=0.03303030003030...$$, which is clearly irrational.

Edit: @DanielFischer showed $$s=\frac{1}{99}=0.\overline{01}$$ is a counterexample, as every odd-indexed digit is 0. Therefore $$x_{P_n}=0$$ since $$P_n$$ is odd for $$n > 1$$, implying $$s_p=\frac{1}{100}$$.

• $(x_n)$ eventually settles down into a recurring sequence (perhaps you already know this). But I would be surprised if it was known one way or the other whether your sum is always irrational or not. Dec 11, 2019 at 20:38
• Because if the decimal representation has finitely many non-zero digits, then $s_p$ will have finitely many terms. Dec 11, 2019 at 20:38
• I see. I didn't read that part. Then you can provably show that $s_p$ is transcendental. They will probably be a Liouville number, since the sequence of primes has arbitrarily large gaps. But one would need to fiddle with the distribution of those gaps, how frequently they occur. Dec 11, 2019 at 20:41
• Let $s = \frac{1}{99}$. Then $s_p = \frac{1}{100}$. You need a condition ensuring that $x_{p_n} \neq 0$ infinitely often. Dec 11, 2019 at 20:46
• No, @SpencerKraisler, it isn't. $\frac{1}{99} = 0.\overline{01}$ doesn't end in a tail of $0$s, but all $x_{2m+1}$ are $0$, and there are only finitely many even primes. Dec 11, 2019 at 20:56

Unless the $$x_{p_n}$$s are all eventually $$0$$, the maximum number of consecutive $$0$$s between nonzero terms in $$0.0x_2x_30x_50x_7000x_{11}0x_{13}\ldots$$ grows without limit, since the maximum number of consecutive composite numbers grows without limit (e.g., $$n!+2,n!+3,n!+4,\ldots,n!+n$$), so no number of the OP's given form, with the assumption that $$x_n=0$$ for only finitely many $$n$$, can be rational.