# Digits of irrationals

I've been studying floating point arithmetic and I've read somewhere that numbers with infinitely many decimal digits without recursion are irrational.

But since we can't know all the digits of such a number then how did we come to the conclusion that its digits have no recursion? Does it have anything to do with formulae used to compute the $n$-th digit of a number?

(This is a question simply out of curiosity.)

• Maybe reword the "read somewhere" part as "reals whose decimals are neither terminating nor eventually repeating are irrational." – coffeemath Mar 3 '17 at 13:35
• You can know easily if the digits are specified algorithmically, as in $\alpha =\sum 10^{-n^2}$. Otherwise, your instincts are reasonable...this isn't a good way to show that a number is irrational. – lulu Mar 3 '17 at 13:35
• You usually prove that a number is irrational by contradiction, assuming that it is rational and getting a contradiction. See homeschoolmath.net/teaching/proof_square_root_2_irrational.php – RanSch Mar 3 '17 at 13:51
• The question should specify which number you are talking about. Could be mathematical constants, experimental data or results of numerical computations. These situations are very different. – Yves Daoust Dec 28 '18 at 10:08

The simpler (and ancient) way to know if a number $a$ is irrational is to explicitly show that it cannot be expressed as a quotient $\frac{n}{m}$ of two integers $n,m$.

But there are numbers, as the number $\pi+e$, for which we don't know if they are rational or irrational.

Floating-point (as well as fixed-point) arithmetic is just unable to represent irrationals and most rationals.

Actually, the floating-point numbers are essentially integers in a finite range, with a movable point, and can't have more than 16 (significant) decimal digits.

• More generally I would say that any computable number can be represented by a finite program which outputs its digits. Alas, we won't know if it's irrational in most cases – Yuriy S Dec 28 '18 at 9:48

I've read somewhere that numbers with infinitely many decimal digits without recursion are irrational.

This property can indeed be used to determine whether some numbers are irrational. For instance, the prime constant, defined by

$$\rho =\sum _{{p}}{\frac {1}{2^{p}}}=\sum _{{n=1}}^{\infty }{\frac {\chi _{{{\mathbb {P}}}}(n)}{2^{n}}},$$

where the sum goes over all primes $$p$$ and $${\displaystyle \chi _{\mathbb {P} }}$$ is the characteristic function of the primes, has a $$1$$ as its $$k^{\rm th}$$ digit if $$k$$ is prime, and $$0$$ otherwise. It can be shown using an argument similar to yours that $$\rho$$ is irrational. Another example is the constant whose every $$2^{k^{\rm th}}$$ digit is $$1$$ and every other is $$0$$:

$$0.0101000100000001\ldots,$$

which is also irrational.

But since we can't know all the digits of such a number then how did we come to the conclusion that its digits have no recursion?

As you rightly observe, in other cases irrationality is proved by other means. For instance, the irrationality of $$\sqrt 2$$ is proved by assuming first that it is rational, i.e., equal to some $$\frac ab$$, where $$a\neq b$$ and $$a,b>1$$ are positive integers, and coming to a contradiction (for a nice presentation see here). A slightly more difficult proof using different techniques is used to show that the number denoted by $$\zeta(3)$$, where $$\zeta$$ is the Riemann zeta function, is irrational.

The proof is that if the number had a series of recurring digits, then it would be rational. Suppose the number is a.bbbrrrr where bbb is the leader digits and rrrr is a recuring patten.

Then this number is $$a + \frac b{10^B} + \frac r{10^{B+R}-10^B}$$, where b is the digit string bbb, and B is the number of places it occupies, and r, R are the recurring digits, and the period length.

Since this number is rational in every case, there is no recurring pattern that is not rational.