Yes. Pi Day is over. Well, at least it is over for those of us that write the date as mm/dd/yy (called middle endian). However, there is another way to represent the date. Some people (ok, most people) use the dd/mm/yy format (called little endian). Really, I can see where they are coming from. This goes from smaller thing to bigger thing and that seems logical.

Anyway, back to Pi Day. Here in the USA, that would be March 14. You know, 3/14 (like 3.14....). But in other countries, March 14 would be 14/3/2011 and clearly that is not Pi. As Dave (@DaleV34) pointed out: there is no 31st of April (that would be 31/4/2011). Also, there is no 14th month to do 3/14. But there are some options:

What about 3/1 (January 3 rd )? Sure it isn't as recognizable as 3.14, but it is just as good - right? 3 places out of infinity vs. 2, what is the difference? However, this is right after New Years Day. Busy time for people.

)? Sure it isn't as recognizable as 3.14, but it is just as good - right? 3 places out of infinity vs. 2, what is the difference? However, this is right after New Years Day. Busy time for people. What about 22/7? You know, like 22 divided by 7 as an approximation for Pi? This would be in July - a nice month for a holiday.

What about 14/3. Yes, this is not Pi - but it is Pi Day in the USA. This wouldn't be a terrible idea even if the date doesn't actually work out.

This whole discussion reminded me of Pi. I remember some book somewhere listing Pi as 22/7. It isn't a terrible representation. Isn't it better than writing 3.14? What is the percent error for both of these (here I will use the 3 plus the first 16 digits of Pi - because that is the default for python).

Technically, 22/7 is better than 3.14 (which the USA Pi Day).

This leads to the question:

What other fractions could represent Pi? —————————————-

Just google-it you say? No. I will write a simple python program to find appropriate fractions to represent Pi. Here is my plan. First, I will have my temporary pi be represented by:

Where n and d are integers.

First, I will start with n = d = 1.

If n/d is less than pi, I will increase by 1.

If n/d is greater than pi, I will increase d by 1.

Repeat the above until my computer complains.

Doing the above gives the following values (this is just for 50 times)

You can see out of these 50 fractions, 22/7 is the closest to Pi and not the last one (38/13). Ok, let me take this to the next level. Now I will do this with more iterations. I will only record the fractions when it is better than the previous one. Actually, I removed the first two fraction estimates because they sucked so bad the graph looked weird.

This is crazy. Out of 1000 iterations, the best value was at n = 467 (with an estimate of 355/113). Nothing better after that. Also, it is odd that there is a group sort of evenly spread out between n = 200 and 500. What next? Oh, you know. If running it up to n = 1000 is cool, what about n = 10,000? Yeah. I am going to do it.

The graph is dumb, so I am not going to include it. If you run this to 10,000 you don't get a better estimate. Crazy. Well, maybe not too crazy. I just realized that maybe my Pi is not accurate enough. Ok, I still think I have a nice fractional representation of pi.

Could this fraction be used for non-USA Pi Day? Well, there are no months with 355 days so I guess not. My official recommendation is to stick with July 22.

One more thing. I was looking at the fractions that made a good fractional representation of pi. Let me list these:

13/4 *

16/5 *

19/6 *

22/7 *

179/57 *

201/64

223/71 **

245/78

267/85

289/92

311/99 *

333/106

355/113 *

Maybe you already see it. The fractions with the * indicate that one of the numbers in the fraction is a prime number. 223/71 has two prime numbers. Coincidence? I think not. Government conspiracy? I think maybe.

Just a quick note. I use the Chromey Calculator plugin for google Chrome. This plugin is so awesome, I don't know what to say. Essentially it is a calculator that uses google and Wolfram Alpha. Install it and then type in "is 223 prime?". Boom. There is your answer. Oh, try this "what is the largest prime smaller than 5000?" Boom - 4999 is prime.