next up previous
Next: Sequences of Polynomials Up: The Structure of Numbers Previous: The Structure of Numbers

Binary Expansions

In the 17th century, Gottfried Wilhelm Leibniz[*] asked in a letter to one of the Bernoulli brothers if there might be a pattern in the binary expansion of $\pi$. Three hundred years later, the question remains. The numbers in the expansion appear to be completely random. In fact, the most that can be said of any of the classical mathematical constants is that they are largely non-periodic.

With traditional analysis revealing no patterns of interest, generating images from the expansions offers intriguing alternatives. Figures 2 and 3 show 1600 decimal digits of $\pi$ and 22/7 respectively, both taken mod 2. The light pixels are the even digits and the dark one the odd. The digits read from left to right, top to bottom, like words in a book.

  
Figure 2: The first 1600 decimal digits of $\pi$ mod 2.
\begin{figure}
    \centerline{
    \psfig {figure=FIGPI1600MOD2BW.ps,width=2in}
    }\end{figure}

What does one see? The even and odd digits of $\pi$ in Figure 2 seem to be distributed randomly, as one would expect. And the fact that 22/7 (the widely used approximation for $\pi$) is rational appears clearly in Figure 3. Visually representing randomness is not a new idea; Pickover [15] and Voelcker [17] have previously examined the possibility of ``seeing randomness". Rather the intention here is to identify patterns where none has so far been seen, in this case in the expansions of irrational numbers.


  
Figure 3: The first 1600 decimal digits of 22/7 mod 2.
\begin{figure}
\centerline{
\psfig {figure=FIG22OVER71600MOD2BW.ps,width=2in}
}\end{figure}

These are only simple examples but many numbers have structures which are hidden both from simple inspection of the digits and even from standard statistical analysis. Figure 4 shows another rational number 1/65537, this time as a binary expansion, with a period of 65536. Unless graphically represented and with sufficient resolution, the presence of the period might otherwise be missed in then unending string of 0's and 1's.


  
Figure 4: The first million binary digits of 1/65537 reveal the subtle diagonal structure from the periodicity.
\begin{figure}
\centerline{
\psfig {figure=FIG65537BW.ps,width=2in}
}\end{figure}

Figures 5 a) and b) are based on similar calculations using 1600 terms of the simple continued fractions of $\pi$ and e respectively. Continued fractions take the form of

\begin{displaymath}
\frac{1}{a_1 + \frac{1}{a_2 + \frac{1}{a_3 + \cdots}}}\end{displaymath}

In these images, the decimal values have been taken mod 4[*]. Again the distribution of the ai of $\pi$ appear random - though now, as one would expect, there are more odds than evens. However for e, the pattern appears highly structured. This is no surprise on closer examination as the continued fraction for e is

\begin{displaymath}[2,1,2,1,1,4,1,1,6,1,1,8,1,1,10,1,1,12,\ldots]\end{displaymath}

and is a rational number mod 4. It is apparent from the images that the natures of the various distributions are quite distinct and recognizable. In contrast no such simple pattern exists for expansions like $\exp(3)$ mod 4 [*]


  
Figure 5: The first 1600 values of the continued fraction for a) $\pi$ on the left and b) e, both mod 4
\begin{figure} \makebox[1.5in][c] { \psfig {figure=FIGCFPI1600MOD4BW.ps,width=1.... \begin{figure} \makebox[1.5in][c] { \psfig {figure=FIGCFE1600MOD4BW.ps,width=1.5in} }\end{figure}

Presumably this representation of numbers offers a qualitative handle on their character. It tags them in an instantly distinguishable fashion which would be almost impossible to do otherwise.


next up previous
Next: Sequences of Polynomials Up: The Structure of Numbers Previous: The Structure of Numbers
loki@cecm.sfu.ca