Content uploaded by Thomas Osler

Author content

All content in this area was uploaded by Thomas Osler on Dec 21, 2015

Content may be subject to copyright.

1

7/31/98

GET BILLIONS AND BILLIONS OF CORRECT DIGITS OF PI

FROM A WRONG FORMULA

Mathematics and Computer Education , Vol. 33, No. 1, 1999, pp.40-45.

Prof. Thomas J. Osler

Department of Mathematics

Rowan University

Glassboro, N. J. 08028

osler@rowan.edu

1. Introduction

In Appendix III of the book by Lennart Berggren and Jonathan and Peter Borwein

[2] we find the remarkable statement: The following is not an identity but is correct to

over 42 billion digits:

(1.1)

1

10

5

10

2

210

e

n

n

−

=−∞

∞

∑

F

H

G

I

K

J

=

/

.

π .

When I first showed this formula to my colleagues at Rowan University, they were in

disbelief. Can there be a formula that will generate accurately some 42 billion

consecutive digits ofπ , yet give incorrect results once 43 billion digits are found? It is

the purpose of this note to demonstrate why this incredible statement is indeed true. It is

the discovery of mysterious gems like the above that makes being a professional

mathematician fun.

Before continuing, we mention that the series in (1.1) would yield a very

inefficient computer algorithm for the actual numerical evaluation of the digits in π . We

are not discussing the use of this series for numerical computation. We are considering

the series as a representation of a number remarkably close to π .

2

For classroom purposes, we will first need to review how the common logarithm

is used to count the number of important decimal digits in any quantity. Next we will

need the briefest introduction to the theta functions. Since theta functions are an

advanced topic, we will only state the results needed and give references for the full

story. It is hoped that the combination of counting digits, the theta functions and the

approximate formula for π will provide a stimulating hour for undergraduate classes

from calculus to numerical analysis.

At the end of this paper we will show how to modify the series in (1.1) so that it is

as close to π as we like. The motivation for writing this paper came from reading the

problem solution by N. Lord in [3].

2. Counting decimal digits

How many decimal digits are in the integer part of the large number exp(1000)?

How many zeroes follow the decimal point in the very small number exp(-2000)? Most

calculators will not help with these questions since they produce an overflow error. Back

when I was a boy, before the calculator days, we used tables of common logarithms to do

simple arithmetic. Common logarithms use the base ten. The answers to the above

questions were easy for users of these log tables.

Suppose a number larger than one is written in scientific notation such as 1.735

E 21. This means the number has 21 + 1 or 22 digits to the left of the decimal. If the

number is smaller than one like 3.786 E -21, then it has | -21 + 1 | or 20 zeroes to the

right of the decimal point. In either case the answers to the questions we raised above for

numbers given in scientific notation x E y is | y + 1 |. For convenience we will

introduce two new functions, digits(z) and zeroes(z) to help us discuss these questions.

3

If 1 ≤ z then

digits(z) = the number of decimal digits to the left of the decimal point for z.

If 01<<z then

zeroes(z) = the number of consecutive zeroes to the right of the decimal for z.

Now consider the common log of the number z = x E y

log ( ) log ( )

log log

log

10 10

10 10

10

10

10

xEy x

x

yx

y

y

=

=+

=+

In this last expression y is an integer and 0 1

10

≤<

log x . If we use the symbol [ z ] to

denote the greatest integer less than or equal to z, then we see from the above that if z =

x E y, then

log log

10 10

zxEyy==.

Now we conclude that

1. If

1

≤

z

, then the number of digits to the left of the decimal point is

(2.1) digits z z( ) [log ]=+

10

1.

2. If

01

<<

z

, then the number of consecutive zeroes to the right of the decimal

point is

(2.2) zeroes z z( ) [log ]=+

10

1.

We can now answer the questions raised at the start of this section. The number of

digits to the left of the decimal in the number exp(1000) is

digits e e e

()[log ] [ log]

1000

10

1000

10

1 1000 1 435

=+= +=.

The number of zeroes to the right of the decimal point in the number exp(-2000) is

zeroes e e e

()|[log ]||[ log]|

−−

=+=−+=

2000

10

2000

10

1 2000 1 868

.

4

We can now count digits in very large and very small numbers with the help of common

logarithms.

3. The remarkable theta functions

In the forward to his excellent book [1], Richard Bellman writes: “The theory of

elliptic functions is the fairyland of mathematics. The mathematician who once gazes

upon this enchanting and wondrous domain crowded with the most beautiful relations

and concepts is forever captivated.” We will need one of these “beautiful relations “ of

which Bellman speaks. After studying polynomials, rational, trigonometric, logarithmic

and exponential functions in calculus, we encounter the vast world of special functions.

These functions include those of Bessel, the hypergeometric, the elliptic, the theta

functions and many many more. This higher trigonometry is used extensively in both

pure and applied mathematics.

There are many theta functions, just like there are many trigonometric functions.

We will need the one theta function

(3.1) gt n t

n

( ) exp( )=−

=−∞

∞

∑

2

π .

The series converges absolutely for all positive t. This function satisfies the remarkable

transformation formula

(3.2) gt t g t() / ( / )

=

11.

We will not prove (3.2) here, a full explanation is found in [1] on pages 1 to 11. Related

information is also found in the classic [4]. The transformation formula (3.2) follows

easily from the Poisson summation formula. The Poisson summation formula can be

5

derived with the help of the exponential Fourier series and integral. Therefore, the

student who has studied Fourier series should have no trouble deriving (3.2) from (3.1)

by studying Bellman’s excellent description in [1].

4. Our main derivations

We are now equipped to examine the relation (1.1) and to exhibit the remarkable

properties claimed for it. First we write out the transformation formula (3.2) using the

series (3.1) to get

(4.1)

exp( ) / exp( / )−= −

=−∞

∞

=−∞

∞

∑∑

nt t n t

nn

22

1ππ

.

Next we let tc

=

1/( )

π

and obtain

(4.2) exp( / ) exp( )

−= −

=−∞

∞

=−∞

∞

∑∑

nc c n c

nn

222

ππ

.

Multiplying the above by 1/ c and rewriting the series on the right by combining

identical terms for negative and positive n we get

(4.3) 112

222

1

/ exp( / ) exp( )cnc nc

nn

−= + −

=

∞

=−∞

∞

∑∑

ππ

bg

=+ −

=

∞

∑

ππ π2

22

1

exp( )nc

n

.

If we let c =

10

10

, then the series on the left of (4.3) is the series in (1.1). Think of the

right hand side as having two terms, π and the series

(4.4) sc n c

n

( ) exp( )=−

=

∞

∑

2

2

1

2

ππ.

6

For the original claim regarding (1.1) to be true, this last series must be very very small.

Indeed for c =

10

10

the series (4.4) when written out as a decimal number must have

several billion consecutive zeroes to the right of the decimal point. Is this true?

The first term in (4.4) is

2

2

ππexp( )− c

. The number of digits to the right of its

decimal point is given by (2.2) as

(4.5) zeroes c c( exp( )) [log ( exp( ))]221

2

10

2

ππ ππ−= − +.

Using the laws of logarithms we get

(4.6) zeroes c c( exp( )) [log ( ) log exp( )]22 1

2

10 10

2

ππ π π−= + −+

=−+[log ( ) log ]

10

2

10

21ππce.

This last expression is expected to equal several billion, so the terms

log . ...

10

2 1 15496

π+ =

can be ignored. Thus we get approximately

(4.7) zeroes c c e c( exp( )) log .2 4 2863

22

10

πππ−≈ ≈

..

With c =

10

10

this last expression is a bit over 42 billion and the claim that (1.1) is

accurate only to “over 42 billion digits” is now emerging as correct. It remains only to

consider the effect of the other terms in the series (4.4). These terms have n = 2, 3, 4, ...,

and reasoning as above we find

(4.8)

zeroes n c n c e n c( exp( )) log .2 4 2863

22 22

10

2

πππ−≈ ≈

For the second term ( n = 2 ) we have

zeroes c c(exp( )).2 4 17 1453

2

ππ−≈ .

7

Here (with c =

10

10

) we have a little over 171 billion zeroes to the right of the decimal

point. It is clear that this second term, when added to the first, will not interfere with the

conclusion drawn from the first term alone. The same is true for all remaining terms.

Finally we notice that the above argument allows us to generalize the claim made

for the original expression (1.1). Using (4.3) and (4.7) we see that

(4.9) 1

2

/exp(/) ()cncsc

n

−=+

=−∞

∞

∑

π

where

(4.10) zeroes s c c(()) .≈ 4 2863

Thus π is approximated by the series on the left of (4.9) with 4.2863 c decimal

digits of accuracy. By taking c large enough, we can get as many billions of digits of

accuracy as we want, but never complete accuracy. For example, if we take c =

10

19

we

get 42 billion billion digits of accuracy of π rather than the mere 42 billion obtained

before!

5. Final thoughts

It is interesting to reflect on the significance of what we have seen. At the time of

this writing, (July 1998), π has been calculated by computer to over 51 billion digits. We

have not tried to use the expression (1.1) to calculate these digits, yet we know that if a

super computer were available capable of such a monumental numerical feet, it could

give us up to 42 billion correct digits. This information is made possible by the power of

mathematical analysis. We needed the amazing transformation formula for the theta

functions (3.2) as well as the more mundane logarithmic count of the digits via (2.2).

8

With consummate ease, mathematical analysis enables us to modify these expressions so

as to increase the number of correct digits to billions and billions more by simply

increasing c in (4.9) and (4.10). The lover of mathematics can look forward to an

endless succession of wonderful surprises.

6. Acknowledgments

This author wishes to thank Abdul Hassen, Ming Li, Michael Radin and Jim Zeng

of the Math/ Physics Seminar at Rowan University for many valuable improvements in

this paper.

7. References

[1] R. Bellman, A brief introduction to the theta functions, Holt, Reinhart and Winston,

New York, 1961, pp. 10-11.

[2] L. Berggren, J. M. Borwein and P. B. Borwein, Pi: a source book, Springer (1997),

p. 689.

[3] N. Lord, Solution to problem 81.F, Math. Gazette, 82(1998), pp. 130-131.

[4] E. T. Whittaker and G. N. Watson, A course of modern analysis, Cambridge

University Press (1927), p. 124.