Hacker News new | ask | show | jobs
by moonchild 2029 days ago
Not necessarily. It depends on the combination of numbers (and the irrational number).
1 comments

Indeed not every irrational number has this property, for instance you could create an irrational number using only the digits 1 and 2, but some irrational numbers do have this property.

Until I did some research a few minutes ago, I thought this property was the irrational number being a "normal number"; however, that is not the case. That all said, a Normal number definitely has this property and I don't think having this property implies normality, but I don't know either way.

An interesting fact though is that almost all real numbers are normal, which means pretty much every irrational number has this property, though not every irrational number. However, we still don't know if pi, e or square root 2 are normal.

> I don't think having this property implies normality, but I don't know either way.

Having this property cannot imply normality. Imagine an irrational number z which has this property, and another number z' constructed from z by taking the first 1 digit of z, appending 1 "2", appending the first 2 digits of z, appending 2 "2"s, appending the first 3 digits of z, appending 3 "2"s, and so on.

Using e as an example, our z' would begin 2.7 2 71 22 718 222 7182 2222 71828 22222...

z' is irrational and shares the property that every sequence of digits can be found in its decimal expansion. But it is obviously not normal; over half of its digits are "2".

Interesting, my first inclination is to be skeptical that the property would still hold, since we're "potentially" slicing up a necessary sequence and adding 2s in the middle.

However infinities are weird* and I think you could construct a proof by contradiction making use of the fact that a sequence of N digits is embedded in infinitely many longer sequences most of which that won't have been broken up by the inserted 2s.

* I'm always skeptical when dealing with infinities and probabilities. Human intuition doesn't gel well with either concept.

Shoring up places where I thought my proof was weaker:

- I rely on the assumption that an irrational number with this property exists. (If it didn't, then the property would imply normality.) This is easy to fix; Champernowne's constant has this property and so the assumption is valid.

- I assert without proving that z' is irrational. We can prove this using the definition of a rational number as one whose decimal expansion repeats after some index. Since z is irrational, somewhere in its decimal expansion there is a digit not equal to 2. (Otherwise, every digit of z would be 2, and z would be the rational number 2/9.) Since z' successively repeats larger and larger stretches of z, this suffices to show that, for any index i into z', there is a higher index j > i such that the jth digit of z' is not 2.

- But we also know that a sequence of n "2"s in a row can be found within z' for any positive n. Assume that the jth digit of z' is not 2. Since we know that a sequence of 2j "2"s occurs later within z' -- it can't occur earlier because not enough digits have yet occurred -- any cycle in the digits of z' cannot yet have begun by index j.

- But since there is no maximum index into z' beyond which all digits are not 2, a cycle in the digits of z' cannot have begun at any index into z'. This shows that z' is irrational.

> Since we know that a sequence of 2j "2"s occurs later within z' -- it can't occur earlier because not enough digits have yet occurred -- any cycle in the digits of z' cannot yet have begun by index j.

This is wrong -- the cycle might begin at j and continue into a huge series of 2s.

But we cannot yet have completed one cycle by index j, and this property can be extended -- there is no index into z' at which one cycle could have been completed, and hence the digits of z' never cycle.

A much simpler proof that there is no cycle goes like this:

Suppose there is a cycle of length n. We know that a stretch of 2n consecutive 2s will appear after the beginning of the cycle. This implies that the cycle consists entirely of 2s. We also know that a non-2 digit will appear after the beginning of the cycle. This is a contradiction; there cannot be a cycle of any length.

> my first inclination is to be skeptical that the property would still hold, since we're "potentially" slicing up a necessary sequence and adding 2s in the middle.

No. If the sequence you want occurs between places a and b of z, then it is a substring of the full sequence between places 1 and b of z, and all such sequences are included within the expansion of z'. (Going by example again, if you're interested in the sequence that occurs between decimal places 41,028 and 315,001 of z, then that sequence will occur within the part of z' that repeats places 1 through 315,001 of z.)

> However, we still don't know if pi, e or square root 2 are normal.

The math is somewhat beyond me - at least, without digging into the formal proof - but my understanding is that we can prove that pi cannot be represented as a ratio of two integers, and therefore cannot have a finite decimal representation.

We know all these numbers are irrational. That's been known for a long while. Normal numbers are something different, however.

You can look at the wikipedia definition[1], but that involves a few levels of definitions that I don't know, like density, but the gist is that every sequence of N digits occurs with equal frequency to every other sequence of N digits in the expansion of the number.

The definition is complicated due to dealing with infinity and multiple bases.

But that said even with this superficial understanding we can see two things: * Rational numbers can never be normal, since the digits repeat after some period. (Just choose a sequence of numbers longer than the period and you can easily construct a sequence that doesn't appear) * Normal numbers contain every sequence of N digits in their decimal expansion. So if we prove pi is normal (like we believe it is) then we know somewhere in its decimal expansion we can find any sequence of digits we want. Which is the property this comment[2] was referring to.

[1]: https://en.wikipedia.org/wiki/Normal_number [2]: https://news.ycombinator.com/item?id=25282609