Tuesday, 3 March 2015

So Many Flavors of Pi


Pi day is coming up soon, unless you are one of those continental folks who celebrates on 22/7 with the day before the month, but as long as you celebrate. 

 I had a note on my "On This Day in Math" post for the 62nd day of the year that, "The digits 62 occur at the 61st & 62nd digits of phi, φ; AND The 61st & 62nd digits of e."

But Frank McGillicuddy ‏@Frank_McG commented that "only usng the decimal system - diff for diff numerical base, ur chasing ur tail, broaden ur scope".

Although he didn't talk me into pursuing 62 in other bases, it did get me thinking about how pi looks in other bases. So I did a few of the simple ones.


in base two, pi is 11.001001000011...

in base three, pi is 10.010211012222...

in base four, pi is 3.0210033312222...

in base five, pi is 3.0323221430334...

in base six, pi is 3.0503300514151...

in base seven, pi is 3.0663651432036..._7

Students might be surprised at to note that the values start to march toward the memorized 3.1415... as the base approaches ten

For eight, I wanted to point out again how nicely you can convert from binary to base eight. Just take each three digit period of three digits after the "decimal" point, and combine them into a single base eight number.
For example 11.001001000011... in base two is written with three places nested from the point, so 011 in front of the point and 001, 001, 000, 011 after. The 011 in front in binary is the number three, so in base eight the leading digit is three (yeah, duh). Taking the groups after the point and converting each from binary to (decimal)octal we get 1,1,0,3 and the base 8 expansion of pi is 3.1103755242102...

And as long as I reviewing how to express base 10 (or any other base) numbers in other bases, I will show how to convert base ten pi into base nine.

If I start with 3.1415926535897 the 3 is easy, so we take that off and work with the .1415926535897 Now we begin to do an iterative process to produce each digit in the new base.

Take the number (.1415926535897) and multiply by nine (or whatever base you want to convert to) and the number in the units place is our next digit. In this case we get 1.274333882. The 1 is our next digit (we now have 3.1) and keep the fraction part.
and repeat 9*274333882 = 2.469004938 and we add a 2 to our base 9 expansion (3.12) and keep the .469004938. We can continue for as long as we have digits, but keep in mind you are bound up by the number of digits of pi you begin with. You can find about 50 million on the net somewhere, so the restriction will be the accuracy of the calculator and computer software you work with. But if you don't want to pursue that now, here is Pi in base nine

3.1241881240744...

3.1415926535897..._10
The same thing works in base 12, or 16 or ... play your favorite.
Base 11 is interesting because it looks like every seventh grade textbook approximation of pi, 3.16150702865a4
and here is pi in base 12, 3.184809493b918.

One of the reasons I didn't pursue Frank's challenge is, what would I look for. In base 7, the digits 6 and 2 are there, but 62 in base seven is actually a three digit number: \( 62_{10})= 116_{7} \) And where should I hope they appear, in digits 114,115, and 116? So I think I'm going to let Frank find the appearances of 62 (in whatever form, in whatever base) and I'll rest on what I think was a pretty unusual coincidence, that in base ten the digits appear as indicated.

So I guess if you opted for a different base, you might celebrate Pi day on Nov  0th (work that out among yourselves, or March 2nd for the base four purists. 
But if you think of the twelve months of the year as a good omen for using base 12, then maybe you want to celebrate Pi day on March 18th. Whatever flavor of Pi you celebrate, have a wonderful day.
For me, I'll stick to my March 14 since that's my Grandson Ethan's Birthday. Happy birthday, Ethan


Post a Comment