Rational numbers as a series of rationals Any real number $0<x\leq 1$ can be written as
$$
x = \sum_{n=1}^\infty \frac{1}{p_1\dots p_n},
$$
where $p_1\leq p_2\leq\dots$ is a unique sequence of integers $>1$. The number $x$ is a rational if and only if for some $n_0\in\mathbb{N}$, $p_n=p_{n_0}$ for all $n>n_0$. I know that for $\pi_k = p_1\dots p_k$ and $x=a/b$,
$$
0<a\pi_k - b m_k<\frac{b}{p_{k+1}-1}
$$
for some $m_k\in\mathbb{N}$.The only if part is easy, I have already done it. However, I do not know how to proceed with the if part. The construction is given here.
EDIT: Here is my try. Since $x=a/b$, we have
$$
0<a\pi_k - b m_k<\frac{b}{p_{k+1}-1}.
$$
Then $\frac{b}{p_{k+1}-1}\rightarrow 0$ unless for some $n_0\in\mathbb{N}$, $\frac{b}{p_{k+1}-1}$ remains finite. That is $p_n=p_{n_0}$ for all $n>n_0$.
Is this claim correct?
 A: Direction 1: ($\Leftarrow$) Assume that for $n\geq n_0$ we have $p_n=p_{n_0}$. Without loss of generality, we may as well also assume that for $n<n_0$, $p_n<p_{n_0}$. Then
$$x=\sum_{n=1}^\infty \frac{1}{p_1p_2...p_n}=\sum_{n=1}^{n_0-2}\frac{1}{p_1p_2...p_n}+\sum_{n=n_0-1}^{\infty}\frac{1}{p_1p_2...p_n}$$
Now, denote
$$\beta=p_1p_2...p_{n_0-1}$$
Then the sum above becomes
$$=\sum_{n=1}^{n_0-2}\frac{1}{p_1p_2...p_n}+\sum_{n=n_0-1}^{\infty}\frac{1}{\beta p_{n_0}^{n-(n_0-1)}}$$
$$=\sum_{n=1}^{n_0-2}\frac{1}{p_1p_2...p_n}+\frac{1}{\beta}\sum_{n=0}^{\infty}\frac{1}{ p_{n_0}^{n}}=\sum_{n=1}^{n_0-2}\frac{1}{p_1p_2...p_n}+\frac{1}{\beta(1-p_{n_0}^{-1})}$$
which is rational.
Direction 2: ($\Rightarrow$) Assume that
$$x=\sum_{n=1}^\infty \frac{1}{p_1p_2...p_n}$$
is rational. Then $x=\frac{a}{b}$ can be written such that $\gcd(a,b)=1$. Then
$$a=\sum_{n=1}^\infty \frac{b}{p_1p_2...p_n}$$
Now, assume by way of contradiction that $p_n$ is not eventually constant. Since $p_n$ is an integer, increasing, and not constant, we know
$$\lim_{n\to\infty}p_n=\infty$$
Let $N$ be the smallest index such that $p_{N}-1>b$
Then we know
$$a\prod_{n=1}^{N-1}p_n=\prod_{n=1}^{N-1}p_n\sum_{n=1}^{N-1}\frac{b}{p_1p_2...p_n}+\prod_{n=1}^{N-1}p_n\sum_{n=N}^\infty \frac{b}{p_1p_2...p_n}$$
$$\Rightarrow a\prod_{n=1}^{N-1}p_n-\prod_{n=1}^{N-1}p_n\sum_{n=1}^{N-1}\frac{b}{p_1p_2...p_n}=\sum_{n=N}^\infty \frac{b}{p_{N}p_{N+1}...p_n}$$
Now, note that the left hand side is an integer as
$$\prod_{i=1}^n p_i\bigg\vert \prod_{n=1}^{N-1}p_n\text{ for }n=1,2,...,N-1$$
The left side is also positive as
$$a=\sum_{n=1}^{\infty}\frac{b}{p_1p_2...p_n}>\sum_{n=1}^{N-1}\frac{b}{p_1p_2...p_n}$$
This implies
$$\sum_{n=N}^\infty \frac{b}{p_{N}p_{N+1}...p_n}\in\mathbb{N}$$
(where we have excluded $0$ from $\mathbb{N}$). But we also know
$$p_N\leq p_{N+1}\leq p_{N+2}\leq \cdots$$
which implies
$$0<\sum_{n=N}^\infty \frac{b}{p_{N}p_{N+1}...p_n}\leq\sum_{n=N}^\infty \frac{b}{p_{N}^{n-N+1}}=\frac{1}{p_N}\frac{b}{1-p_N^{-1}}=\frac{b}{p_N-1}<1$$
This is a contradiction as we have found and integer between $0$ and $1$. We conclude that at some point, $p_n$ becomes a constant sequence.
