Summing the digits of Pi

1.4k Views Asked by At

I find $\pi$ and other transcendental numbers quite fascinating. Lately I've been playing around with sequences and $\pi$ and found something relatively intriguing.

Consider $\pi$ written in base $10$, that is, $$ \pi=3.1415926535897932384626433832... $$ Now, let $\pi_i$ be the $i$th digit of $\pi$, such that $\pi_1=3$, $\pi_2=1$, $\pi_3=4$ and so on. Then, consider the sequence which terms $a_k$ are defined by $$ a_k=\sum_{i=1}^k (-1)^{i+1} \pi_i $$ so that, for $k=7$, for example, we get $$ a_7=3-1+4-1+5-9+2=3. $$ I then plotted the sequence $\{a_k\}_{k\in\mathbb{N}}$ up to $5000$ terms and, surprisingly enough, most of the terms are positive and there are some drastic jumps at specific (and suspiciously periodic) points.

enter image description here

I have also computed some further terms in the sequence, including $$ a_{7500}=380,\,\,\,a_{10000}= 181 ,\,\,\,a_{15000}=145,\\ a_{25000}=86,\,\,\,a_{50000}=265,\,\,\, a_{100000}=1694. $$ Well, naturally this is a very random sequence and my humble computer is unable to evaluate a bigger number of terms, so something tells me the randomness of $\pi$ is, in some sense, extended to this sequence.

However, I was wondering whether something can be said about the behaviour of such sequence. For instance, would it be reasonable to assume that the different sums will average to $0$ the more terms we consider? What is exactly happening in these initial stages? And beyond that? I guess most of it relies on the density of certain digits along $\pi$, but also, in a way, on their periodicity. Any ideas?

Edit: In the meantime, I was able to plot the sequence for $10^5$ points, so I will leave it here. The sequence takes negative values again, around $n=30000$.

enter image description here

1

There are 1 best solutions below

2
On BEST ANSWER

I denote $\pi_0=3$, $\pi_1=1$, $\pi_2=4,$... so that $$ \pi=\sum_{n=0}^{+\infty}{\frac{\pi_n}{10^n}} $$ Moreover $$ \forall n\in\mathbb{N},\,\pi_n=\lfloor 10^n\pi\rfloor-10\lfloor10^{n-1}\pi\rfloor $$ and if $a_n=\sum_{i=0}^n{(-1)^i\pi_i}$, we can first say that $(a_n)$ doesn't converge. Otherwise, since $a_n\in\mathbb{Z}$ for all $n\in\mathbb{N}$, the sequence $(a_n)$ would be stationnary and there would exist $p\in\mathbb{N}$ such that $a_{n+1}=a_n$ for all $n\geqslant p$. Thus $\pi_n=0$ for all $n\geqslant p+1$ so that $\pi=\sum_{n=0}^p{\frac{\pi_n}{10^n}}\in\mathbb{Q}$ which is not. We can also ask ourselves which numbers occur the most beyond the $\pi_n$, I would suggest that they all have the same number of occurence which you can verify by calculating a large number of $\pi_n$. Furthermore, the fact that $a_n>0$ for all $n\in\mathbb{N}$ is strange, maybe it gets negative for some very large $n$. If we assume that $\pi$ is a rich number, then you can find the sequences $\underbrace{90\ldots90}_{2N \text{ digits}}$ and $\underbrace{09\ldots09}_{2N \text{ digits}}$ among the digits of $\pi$ with $N$ as large as you want. If $(\pi_{u_N+1},\ldots,\pi_{u_N+2N})=(9,0,\ldots,9,0)$ with $u_N$ even or $(\pi_{u_N+1},\ldots,\pi_{u_N+2N})=(0,9,\ldots,0,9)$ with $u_N$ odd and $u_N$ as small as possible, you have $$ a_{u_N+2N}=a_{u_N}+\sum_{i=u_N+1}^{u_N+2N}{(-1)^i \pi_i}=a_{u_N}-9N $$ so that $a_{u_N+2N}<0$ for $N$ large enough, it does not seem very clear since you could maybe have $a_{u_N}$ always larger than $9N$. However, the sequence $(a_n)$ seems to describe a Brownian motion, according to the law of the iterated logarithm you would have $$ \limsup\limits_{n\rightarrow +\infty}\frac{|a_n|}{\sqrt{2n\log\log n}}=1. $$ Thus if we know an approximation of $u_N$ (which seems hard) what said above would work, depending on the divergence speed of $(u_N)$.