Alternate method to calculate an infinite string of numbers that's not $\pi$, and contains any string

1.1k Views Asked by At

So, rather than using $\pi$, is there any way that isn't overly complicated, (and can be calculated on a computer without taking a year) in which I could generate an infinite string of numbers that could ultimately contain any string of numbers?
Or, if this wouldn't work, do the same but only containing $0$'s and $1$'s?

Must also be able to generate the exact same string every time.

I know this may seem silly/specific for a question, but the idea is that you could find a long though not too large string of numbers, either with the digits $0$-$9$ (or $0$-$1$, using binary)

So, is this possible (in a realistic way) either in some method of $\pi$ or other formulas?

Also, I'm no mathematician, so please make sure to explain in a somewhat simple way.

Update: for instance, searching for $482744003642356604274627660076007$, would take a enormous amount of time and energy to find in pi, but I would like a method to easily find something like that.

I also appreciate all the help!

4

There are 4 best solutions below

0
On

$0.123456789101112131415...$ is the one such number. Given any string of $n$ digits, the density of occurrences of the string is the ideal $1/10^n$, I believe.

0
On

The Champernowne constant $0.123456789101112131415\dots $ is guaranteed to have every finite string of digits represented, and asymptotically in the proper proportion. We do not know if $\pi$ satisfies that. It is also easy to compute any given digit. See this post for how.

6
On

An easy way to "Generate" long strings of numbers is to just roll a 10 sided dice (with numbers 0-9) and put the number which comes up in the current possition. So if you roll four times you may get a $3, 7, 6$ and a $3$ in which case you will get the number 3.763 .

Assymptotically i.e. when this process goes to infinity, you will have probability one of having each (finite) string of numbers in this sequence.

1
On

A (positive) real number is rational if it is the ratio of two whole numbers. When a number is presented as decimal expansion, a theorem states that, a number is rational if and only if, after some initial hiccups, the decimals start repeating in a cyclic manner.

So this theorem gives handle: The square roots, namely $\sqrt2,\sqrt3, \sqrt5,\ldots$ (avoiding the perfect squares) all are known to be irrational numbers, and hence by the above theorem any computational procedure should yield, like in the case of $\pi$, and infinite string of numbers between 0 to 9 without a cyclic pattern.

EDIT: I notice that you want every string to occur as a substring. There are definite algorithms to enumerate all binary strings of length $k$. For each length $k$, list it and string them together as a mega string running through $k=1,2,3,\ldots$ I think this is a binary variation of Ross Millikan's decimal version answer.