Friday, March 14, 2014

Happy Pi Day!

It's March 14th. 3.14. Celebrated mostly as another excuse to eat pie.

Unlike some novelists, I don't have a degree in math. I did make it through college calculus, though, and I really like numbers in almost any form besides homework. So when I went looking for the number of known digits of Pi, I was astounded and pleased to find that there are 12.1 trillion known digits—and they're all available for download!

Of course, encoded as ASCII text, that would be about 12 terabytes of numbers. I don't have nearly that much disk space. Or time. But the downloads are broken up into nice 100,000,000 digit chunks. I downloaded the first one, used Excel to strip out the line numbers, and used TextEdit to search through it. (Because, while Excel will handle 1,000,000 rows, that's literally all it will handle, and it gets dog slow and uses 2 GBs of RAM.)

Of course, I had to make a pie chart.


Big surprise, eh? Each of the 10 decimal digits occurs approximately the same number of times.

However, it's not exactly the same number of times.

Poor 5. So left out.

It turns out that for multiple digit numbers, their frequency depends on their length. (I know. Duh.)


So, if you're looking for your phone number in the first 100 million digits of pi, it's almost guaranteed to be there—if you leave off the area code. If you write your birthday with 7 or fewer digits, it's in there. If you use the standard eight—well, mine's not there.

You're really lucky if your entire ten-digit phone number is in the first 100 million digits of pi. There are people in my area whose phone numbers are. Maybe I should call and wish them a happy Pi Day.

Want to search for your own significant numbers in the fabric of the universe? Here's the file.

1 comment: