Hacker News new | ask | show | jobs
by IngoBlechschmid 725 days ago
That's a great question, and the answer is by direct inspection that repeating digits cause the number to be rational.

For instance, 0.123123123... is checked to be the same as 123/999, a fraction -- hence rational. Similarly, 0.abcdabcdabcd... is the same as abcd/9999. This works for repeating blocks of digits of any length.

2 comments

To add on to this, the question then can become why can’t the number start repeating after a certain point (e.g., 3.14133333333…). But then we can represent it as a sum of 3.141 and 0.000333333…, i.e., two rational numbers. Then we can construct a fraction that represents the number.
and it can also be shown that all rational numbers repeat because there's only so many remainders possible for a given denominator (all the numbers from 0 to n-1), and as soon as you repeat a remainder, you necessarily have to repeat everything from the last occurrence of that remainder.
Ok, a different question: How do we know that several orders of magnitude past the digits we've calculated so far, Pi (or e, or 2^1/2, or any irrational number) doesn't start repeating (or end), and turn out to be rational.

If an irrational number has to have infinite digits without repeating (or stopping), and we can't calculate infinite digits, how can we ever know that a number is actually irrational? What if it's just an absurdly specific rational number, and we just haven't gotten to the end?

There are proofs that pi and e are irrational. These proofs aren't entirely trivial (especially for pi), but they're not very long. There are longer proofs that neither number is algebraic (solution to a polynomial equation with rational coefficients.)

https://en.wikipedia.org/wiki/Proof_that_e_is_irrational

https://en.wikipedia.org/wiki/Proof_that_%CF%80_is_irrationa...

The "third" fundamental constant of mathematics, Euler's constant, is thought to be irrational but there is as yet no proof (so it's conceivable it could be rational!)

You don’t need to know the digits of a number to prove that it’s irrational. You just need to demonstrate that it can’t be expressed as the ratio of two integers.
Indeed! For instance, Wikipedia presents a couple of proofs of the irrationality of √2 (including a geometric one). None of these require knowledge of its digits.

https://en.wikipedia.org/wiki/Square_root_of_2

I think the person you were responding to doesn't understand proof by contradiction.