0

I have a question about irrational or just long sequences of rational numbers.

What method/algorithm is used to determine what digit will come next in the sequence, I mean how do they know for sure? It is a random sequence after all right?

Just tell me how they find the next number in "pi". I know they do it with computers and math, but what is the theory behind knowing what number comes next.

Klangen
  • 5,075
  • 1
    What is a random sequence? Not all sequences are random. – Tobias Kildetoft Apr 08 '16 at 10:28
  • For $\pi$ specifically Machin's formula was used to calculate 500 or so first decimals. Nowadays they use formulas that converge faster. – Jyrki Lahtonen Apr 08 '16 at 11:49
  • They can because $\pi$ is not a random sequence of digits: we know many properties of the sequence and so we are able to evaluate if a digit is correct or not. If you were to use extracts from the decimal representation of $\pi$ as key for an encryption algorithm it is pretty easy that someone would be able to recognize your algorithm and crack your passwords. – N74 Apr 08 '16 at 15:29

3 Answers3

1

Only for a tiny fraction of irrational numbers there is an algorithm that produces the digits in their decimal expansion, because there is only a countable number of algorithms!

Nevertheless, every real number has a decimal expansion, which is unique except for terminating decimals like $1=0.999\cdots$.

There are several methods for $\pi$.

lhf
  • 216,483
1

If you consider the example of $\pi$, there are various formulas which converge at $\pi$. I don't remember one about $\pi$ but we can define $e$ as $$\lim_{x\ \rightarrow \infty} \huge( \normalsize 1 + \frac{1}{x}\huge )\normalsize ^x$$ As you begin to take higher and higher values of $x$, you will notice that the answer begins to get nearer and nearer to $e$.

TheRandomGuy
  • 4,014
  • 2
  • 20
  • 56
1

One simple formula for pi is $$\frac\pi4=1-\frac13+\frac15-\frac17+\frac19\cdots$$ This formula comes from calculus. It also uses the fact that, in radians, $\tan(\pi/4)=1$.
The formulas that people actually use approach $\pi$ much more quickly than this one.

Empy2
  • 50,853