# Pandigital Pi

In the July/August 2006 issue of MIT Technology Review, Richard Hess noted that this expression:

$3 + \frac{16 - 8^{-5}}{97 + 2^{4}} \approx \pi - 3.3 \times 10^{-9}$

provides a good approximation to π using each of the digits 1-9 once. He challenged readers to do better, limiting themselves to the operators +, -, ×, ÷, exponents, decimal points, and parentheses.

The best solution received was from Joel Karnofsky:

$3.14 + \left ( 7^{-.9^{-6}} + 2/8 \right )^{5} \approx \pi - 9.3 \times 10^{-11}$

But Karnofsky noted that this is probably not the best possible. “Unfortunately, my estimate is that there are on the order of 1016 unique values that can be generated under the given conditions and I cannot see how to avoid checking essentially all of them to fnd a guaranteed best. With maybe a thousand computers I think this could be done in my lifetime.”

Indeed, eight months later Sergey Ioffe sent this solution, which he found “using a genetic-like algorithm applying mutations to a population of parse trees and keeping some number of best ones”:

$3 + 5^{-\left ( 7^{.1} \right )} + \frac{.49^{8}}{2^{6}} \approx \pi - 3.8 \times 10^{-13}$

Even that has now been surpassed — on the Contest Center’s ongoing pi approximation page, Oleg Vlasii offers this expression:

$\left ( \frac{2}{.98} - .3 \right ) \times \left (.4 + 5^{(7^{-.6}-.1)} \right ) \approx \pi - 4.1 \times 10^{-14}$

And it’s possible to do even better than this if zero is added as a tenth digit.

03/25/2017 UPDATE: Reader Danesh Forouhari wondered whether there’s a “unidigital” formula for pi. There is — Viète’s formula:

$\displaystyle \frac{2}{\pi } = \frac{\sqrt{2}}{2} \cdot \frac{\sqrt{{2 + \sqrt{2}}}}{2} \cdot \frac{\sqrt{2 + {\sqrt{{2 + \sqrt{2}}}}}}{2} \cdots$