# Interesting π Esoterica

My way of celebrating π day is to rummage through my trove of obscure writings and dig up some interesting esoterica on the subject of that constant. Here’s what I found.

In case you’re new to this: every now and then I encounter a paper or a book or an article that grabs my interest but isn’t directly useful for anything. It might be about some niche sub-sub-subtopic I’ve never heard of, or it might talk about something old from a new angle, or it might just have a funny title. I put these things in my Interesting Esoterica collection on Mendeley. And then when I’ve gathered up enough, I collect them here.

In this post the titles are links to the original sources, and I try to add some interpretation or explanation of why I think each thing is interesting below the abstract.

Some things might not be freely available, or even available for a reasonable price. Sorry.

### Unbounded spigot algorithms for the digits of π

Rabinowitz and Wagon present a “remarkable” algorithm for computing the decimal digits of π, based on the expansion $\pi = \sum_{i=0}^{\infty} \frac{(i!)^2 2^{i+1}}{(2i+1)!}$. Their algorithm uses only bounded integer arithmetic, and is surprisingly efficient. Moreover, it admits extremely concise implementations.

I find the spigot algorithms for π just endlessly fascinating, for some reason. Even more fascinating is the next paper…

### On the rapid computation of various polylogarithmic constants

We give algorithms for the computation of the $d$-th digit of certain transcendental numbers in various bases. These algorithms can be easily implemented (multiple precision arithmetic is not needed), require virtually no memory, and feature run times that scale nearly linearly with the order of the digit desired. They make it feasible to compute, for example, the billionth binary digit of $\log {(2)}$ or $\pi$ on a modest work station in a few hours run time. We demonstrate this technique by computing the ten billionth hexadecimal digit of $\pi$, the billionth hexadecimal digits of $\pi ^{2}$, $\log (2)$ and $\log ^{2}(2)$, and the ten billionth decimal digit of $\log (9/10)$. These calculations rest on the observation that very special types of identities exist for certain numbers like $\pi$, $\pi ^{2}$, $\log (2)$ and $\log ^{2}(2)$. These are essentially polylogarithmic ladders in an integer base. A number of these identities that we derive in this work appear to be new, for example the critical identity for $\pi$:

$\pi = \sum _{i=0}^{\infty }\frac {1}{16^{i}}\bigr ( \frac {4}{8i+1} – \frac {2}{8i+4} – \frac {1}{8i+5} – \frac {1}{8i+6} \bigl ).$

You can calculate any single digit at any point in the decimal expansion of π without computing any of the previous ones! Isn’t that just incredible?

### On Buffon Machines and Numbers

The well-known needle experiment of Buffon can be regarded as an analog (i.e., continuous) device that stochastically “computes” the number $2/\pi \approx 0.63661$, which is the experiment’s probability of success. Generalizing the experiment and simplifying the computational framework, we consider probability distributions, which can be produced perfectly, from a discrete source of unbiased coin flips. We describe and analyse a few simple Buffon machines that generate geometric, Poisson, and logarithmic-series distributions. We provide human-accessible Buffon machines, which require a dozen coin flips or less, on average, and produce experiments whose probabilities of success are expressible in terms of numbers such as, $e^{-1}$, $\log 2$, $\sqrt{3}$, $\cos(1/4)$, $\eta(5)$. Generally, we develop a collection of constructions based on simple probabilistic mechanisms that enable one to design Buffon experiments involving compositions of exponentials and logarithms, polylogarithms, direct and inverse trigonometric functions, algebraic and hypergeometric functions, as well as functions defined by integrals, such as the Gaussian error function.

Buffon’s needle experiment is a decent way of generating an approximation of π manually (it was the winner in Katie’s π calculation challenge). In this paper, Philippe Flajolet generalises the idea to experiments which produce other numbers.

### Poe, E.: Near a Raven

At the time of its writing in 1995, this composition in Standard Pilish, a retelling of Edgar Allan Poe’s “The Raven”, was one of the longest texts ever written using the π constraint, in which the number of letters in each successive word “spells out” the digits of π (740 digits in this example).

Midnights so dreary, tired and weary.
Silently pondering volumes extolling all by-now obsolete lore.
During my rather long nap – the weirdest tap!
An ominous vibrating sound disturbing my chamber’s antedoor.
“This”, I whispered quietly, “I ignore”.

### A new approximation to π

In MTAC, v.2, p.143-145 we noted various formulae which had been used for calculating π to many places of decimals. These included that of MACHIN (1706)

$\frac{\pi}{4} = 4 \tan^{-1} \frac{1}{5} – \tan^{-1} \frac{1}{239},$

which was used by WILLIAM SHANKS (1812-1882) to compute π to 707D. The accuracy of this computation to 500D was verified by an independent calculation completed and published in 1854. No one appears to have checked the later figures until 1945, when Mr. D. F. FERGUSON, now connected with the Department of Mathematics of the University of Manchester, undertook the task.

The only famous maths person from my native County Durham that I know of, William Shanks, set a ridiculous record for calculating π entirely by hand. The sad thing is that just about two hundred years later, major-league buzzkill D.F. Ferguson of Manchester (spit!) decided to try out his new mechanical calculator by checking Shanks’ figures and discovered he’d made an error at the 528th place, so the last 180 digits were wrong. Over the course of a few papers and corrigenda published in Mathematical Tables and other Aids to Computation, Ferguson and various correspondents eventually computed the first 808 digits of π. The final paper, A new approximation to π (conclusion), is of gloriously little use if you haven’t read all the preceding correspondence.

For no easily-explained reason, access to this four-page paper from almost 70 years ago will cost you \$34. Access to the one-side “conclusion” paper also costs, bafflingly, \$34.

### The Ubiquitous π

Some well-known and little-known appearances of π in a wide variety of problems.

So it’s like this column, but with more words. \$12. ### A$144 \times 144$magic square of seventh powers This is really remarkable and I only just found it – a magic square 144 numbers wide, where every number is a seventh power and the sum of each row and column is 3141592653589793238462643383279502884197169399375105 – that is, the first 52 decimal digits of π! If π day is for anything, it’s for approximating π, so I have to include these two papers: ### Rational approximations to π and some other numbers In 1953 K. Mahler gave a lower bound for rational approximations to π by showing that $\left\lvert \pi – \frac{p}{q} \right\rvert \geq q^{-42}$ for any integers$p$,$q$with$q \geq 2$. He also indicated that the exponent 42 can be replaced by 30 when$q$is greater than some integer$q_0$. This result is based on the classical approximation formulae to the exponential and logarithmic functions due to Hermite. Our aim is to improve the knowledge of approximations by rational numbers of the classical constants of analysis such as$\pi$and$\pi/\sqrt{3}$. ### Playing Pool with π (The number π from a billiard point of view) Counting collisions in a simple dynamical system with two billiard balls can be used to estimate π to any accuracy. ### Integer sequences featuring π I recently calculated an integer sequence using π that wasn’t already in the OEIS – no mean feat, since there are absolutely tons of π sequences already. You can find the really good Pi sequences by searching using the “nice” keyword, which the OEIS editors award to particularly interesting sequences. #### A000796 – Decimal expansion of Pi (or, digits of Pi). Got to start with the classic. You might think there isn’t much point in looking at this entry, but the references are packed full of interesting stuff – that’s how I found out about that amazing magic square mentioned above. #### A047777 – Primes seen in decimal expansion of Pi (disregarding the decimal period) contiguous, smallest and distinct. Only eight numbers are listed in this entry! That’s because the ninth one has 3057 digits, as recorded in A121267 – Number of decimal digits in A047777(n). I don’t know if it’s surprising or not that you can go so long without reading a prime. #### A006784 – Engel expansion of Pi. I didn’t know what this meant, but a comment in the entry helpfully explains: For a real number $$x$$ ($$0<x<1$$), there is always a unique increasing positive integer sequence $$(a(i))_{i>0}$$ such that $$x = \frac{1}{a(1)} – \frac{1}{a(1)/a(2)} + \frac{1}{a(1)/a(2)/a(3)} – \frac{1}{a(1)/a(2)/a(3)/a(4)} \ldots$$ This expansion can be computed as follows: let$u(0)=x$and$u(k+1)=u(k)/(u(k)-\lfloor u(k) \rfloor )$; then$a(n)=\lfloor u(n) \rfloor$. #### A001203 – Continued fraction expansion of Pi. This is the real π sequence – forget that base-10 nonsense. There’s a serious computation deficit for this sequence – while 13.3 trillion decimal digits have been calculated, the OEIS only has 15 billion terms of the continued fraction expansion! Ladies and gentlemen, this is a travesty. #### A032445 – Number the digits of the decimal expansion of Pi: 3 is the first, 1 is the second, 4 is the third and so on; a(n) gives the starting position of the first occurrence of n. a.k.a. the solution to the “where is my telephone number in π” problem. #### A080597 – Number of terms from the decimal expansion of Pi (A000796) which includeevery combination of n digits as consecutive subsequences. I like this a lot! Interestingly, it doesn’t grow too quickly. #### A255190 – a(1)=3; a(n) = read the next a(n-1) decimal digits of Pi. Finally, here’s my π sequence. It doesn’t look like it, but it might be finite – if there’s an$a(k)$that is followed by at least$a(k)$zeros, that means$a(k+1)=0$and there’s no next term! I tried a few other bases to see if this happens, but only found base 2, which goes$11, 001, 0\$.

Tags: ,

• 