# [seqfan] Self-building the decimal expansion of Pi with a(a(n))

Eric Angelini Eric.Angelini at kntv.be
Mon Aug 9 19:54:52 CEST 2010

```
Hello SeqFans (bis!)

this is A000796 (decimal expansion of Pi):

3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 3, 3, 8, 3, 2, 7, 9, 5, 0, 2, 8, 8, 4, 1, 9, 7, 1, 6, 9, 3, 9, 9, 3, 7, 5, 1, 0, 5, 8, 2, 0, 9, 7, 4, 9, 4, 4, 5, 9, 2, 3, 0, 7, 8, 1, 6, 4, 0, 6, 2, 8, 6, 2, 0, 8, 9, 9, 8, 6, 2, 8, 0, 3, 4, 8, 2, 5, 3, 4, 2, 1, 1, 7, 0, 6, 7, ...

At every step, the sequence T hereunder produces a new chunk of Pi digits.
When concatenated and provided with the necessary commas, these chunks reproduce A000796.
The elegant (!) definition/formula for T is: « a(a(n)) is the nth chunk of Pi digits ».

T = 4, 3, 1, 3, 5, 26, 6, 5, 2, 8, 10, 26, 19, 26, 2, 31, 10, 1, 7, 6, 1, 2, 2, 10, 2, 9, 19, 26, 5, 0, 23, 10, 10, 1, 13, 19, 3, 7, 26, 2, 26, 26, 2, 19, 5, 11, 5,...

>From now on, T is simply produced by A000796 (in short, A) thanks to this "translating table":

0 in A is 0 in T
1 in A is 3 in T
2 in A is 9 in T
3 in A is 2 in T
4 in A is 1 in T
5 in A is 5 in T
6 in A is 7 in T
7 in A is 19 in T
8 in A is 10 in T
9 in A is 26 in T

Example; in the decimal expansion of Pi, the four yellow integers 5, 1, 0, 5 were encoded in T by the three yellow integers 5, 11, 5 (when you insert 5 in the formula, you get 5; when you insert 11, you get '10' -- which needs a comma between 1 and 0):

A = 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 3, 3, 8, 3, 2, 7, 9, 5, 0, 2, 8, 8, 4, 1, 9, 7, 1, 6, 9, 3, 9, 9, 3, 7, 5, 1, 0, 5, 8, 2, 0, 9, 7, 4, 9, 4, 4, 5, 9, 2, 3, 0, 7, 8, 1, 6, 4, 0, 6, 2, 8, 6, 2, 0, 8, 9, 9, 8, 6, 2, 8, 0, 3, 4, 8, 2, 5, 3, 4, 2, 1, 1, 7, 0, 6, 7, ...

T = 4, 3, 1, 3, 5, 26, 6, 5, 2, 8, 10, 26, 19, 26, 2, 31, 10, 1, 7, 6, 1, 2, 2, 10, 2, 9, 19, 26, 5, 0, 23, 10, 10, 1, 13, 19, 3, 7, 26, 2, 26, 26, 2, 19, 5, 11, 5,...

>From now on, using the translating table, we extend T like this:

A = (...) 5, 1,  0, 5,  8, 2, 0,  9,  7, 4,  9, 4, 4, 5,  9, 2, 3, 0,  7,  8, 1, 6, 4, 0, 6, 2,  8, 6, 2, 0,  8,  9, ...
T = (...)    5, 11, 5, 10, 9, 0, 26, 19, 1, 26, 1, 1, 5, 26, 9, 2, 0, 19, 10, 3, 7, 1, 0, 7, 9, 10, 7, 9, 0, 10, 26, ...

One last thing must be said: T invisibly starts with a 0 (zero) -- and this 0 corresponds to the cases where a(n) = 0. This is forced by the digits 0 in Pi itself.

To see how the formula a(a(n)) works, here are the successive chunks of Pi for n = 1 to 47 (only five yellow chunks of Pi have more than one digit) :

...