Shanks’ approximation to pi

In “Pi Approximations“, line 58, Weisstein mentions one by Shanks (1982) that differs by a mere 10^{-82} as,

\pi \approx \frac{6}{\sqrt{3502}}\, \ln(2u)

where u is “…a product of four simple quartic units”. Frustratingly, he doesn’t give u but I eventually found the primary source online. Hence,

u = \big(a+\sqrt{a^2-1}\big)^2 \big(b+\sqrt{b^2-1}\big)^2 (c+\sqrt{c^2-1}) (d+\sqrt{d^2-1})


\begin{aligned}a &= \tfrac{1}{2}\, (23+4\sqrt{34}\,)\\ b &= \tfrac{1}{2}\, (19\sqrt{2}+7\sqrt{17}\,)\\ c &= 429+304\sqrt{2}\\ d &= \tfrac{1}{2}\,(627+442\sqrt{2}\,) \end{aligned}

with a slight modification by this author since Shanks didn’t realize the first two quartic factors were in fact squares.  (The product of the last two factors is also a square.)

A cute thing about these numbers is that their defining polynomials are palindromic, the same read forward or backward.  For example, the first factor (unsquared) is the root of,

x^4-46x^3-13x^2-46x+1 = 0

Author’s note:  Daniel Shanks (1917-96) was a mathematician best known as the first to calculate pi up to 100,000 decimal places, as well as for his book, Solved and Unsolved Problems in Number Theory.

In general, Shanks’ approximation belongs to the family,

\begin{aligned} e^{\pi\sqrt{2m}} &\approx \left(\tfrac{\eta(\frac{1}{2}\sqrt{-2m})}{\eta(\sqrt{-2m})}\right)^{24}\\ &\approx 2^6 x^{k}\end{aligned}

where \eta is the Dedekind eta function and, for m a positive odd integer, then x is an algebraic integer that is the root of an equation P(x) with palindromic (if unsigned) coefficients.  For appropriate k, then P(x) has degree equal to the class number h(-2m).  Furthermore, it is solvable in radicals.  

For example, given prime m, with 2m = {10, 14, 26} which has class number 2, 4, 6, respectively, then k = 12 and,

\begin{aligned} x_{10}&\; \text{is a root of}\, x^2-x-1 =0\\ x_{14}&\;\text{is a root of}\, x^4-2x^3+x^2-2x+1 = 0\\ x_{26}&\;\text{is a root of}\, x^6-2x^5-2x^4+2x^2-2x-1 = 0 \end{aligned}

and so on.  It then is a simple matter to take the natural logarithm of both sides to bring down pi and have a relation of form,

\pi \approx \frac{1}{\sqrt{2m}} \ln(2^6 x^{k})

Shanks chose 2m = 3502 since d = 4(2m) is the largest fundamental discriminant d divisible by 4 with class number h(-d) = 16.  Here is a list of of d with small class number.  You can calculate it (among many other things) in simply as,



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: