Does $\pi$ satisfy the law of the iterated logarithm?

It is widely conjectured that $\pi$ is normal in base $2$.

But what about the law of the iterated logarithm?

Namely, if $x_n$ is the $n$th binary digit of $\pi$, does it seem likely (from computer experiments for example) that the following holds? $$\limsup_{n\rightarrow\infty} \frac{S_n }{\sqrt{n\log\log n}}=\sqrt{2}\quad\text{where}\quad S_n=2(x_1 + \ldots + x_n) - n$$

What about other (conjectured) normal numbers like $e$ and $\sqrt{2}$?


I am sorry if this is too easy, but I tried to search for it and I could not find in on the Internet. I suppose I could run an experiment myself, but I assumed this is well known, and I would need to brush up on my programming skills to do so...

Update 8/9/2013:

I found a website with the first 32,000 binary digits of $\pi$ and (using a spreadsheet program) graphed out the average of the bits $S_n/n$, comparing it to $\sqrt{\frac{2 \log \log n}{n}}$. The results were inconclusive. The average never got close to $\sqrt{\frac{2 \log \log n}{n}}$ (except at the very beginning when it was way past it). However, I had the same result with a source of randomness (the one built into the spreadsheet program). My conclusion is that 32,000 bits is not enough to see if the law of the iterated logarithm (experimentally) holds for $\pi$. (The picture in the Wikipedia article uses at least $10^{50}$ bits, and the pattern is clear at about $10^{12}$ bits. However, I don't know where to get even 1,000,000 binary digits of $\pi$ on the Internet.

[End Update]


Also, I am sorry that I really don't know how to properly tag this.


Solution 1:

I favourite'd this two years ago and recently stumbled upon it again. Here's some code I wrote to answer this numerically.

enter image description here

  • The dotted line is $\sqrt{2 \log\log n/n}$
  • The solid line is $S_n/n$
  • $S_n = 2 \sum_{k=1}^n x_k - n$ where $x_k$ is the k-th decimal digit of Pi in binary.

You should be able to zoom in by running the code. You'll need matplotlib and numpy. I used y-cruncher to generate the digits.