This question is inspired by a (now deleted) answer to this question. The answerer tried to claim that given an arbitrary real number in decimal form, one can "guess" if it is rational/irrational by observing if repetition occurs in a finite string of decimal points. This claim was heavily criticized.
I would like to know if there is any way to make such a statement rigorous. Here is how I would do it:
1: Define a "repetition counter" $R(w)$ that computes, given a string $w=w_1 w_2\ldots w_n$ with $n$ digits, how "repetitive" the string is.
For instance, $R(1)=1$, $R(12)=1$, $R(121)=1$, $R(1212)=2$, $R(12125)=1$, $R(121255)=2$, $R(1212555)=3$.
2: Let $N>1$ be a fixed reject value; that is, given a real number $x$ whose first $n$ decimals form $w$, then if $R(w)<N$, we "guess" that $x$ is irrational; if $R(w)> N$, we conclude $x$ is rational.
In the limit $n\to\infty$, if $x$ is rational then $R(w)\to\infty$, so the chance of incorrectly labeling it as irrational should go to zero.
Similarly, in the limit $n\to\infty$, if $x$ is irrational then $R(w)\to1$, so the chance of incorrectly labeling it as rational should go to zero.
Does my attempt contain any flaws? More generally, can one ever reasonably say "it's probably rational/irrational" in the sense that the error goes to $0$?