# Slightly Incorrect Ugly Mathematical Christmas T-Shirts: Part 1

This year, I thought I’d surprise my family with matching ugly mathematical Christmas sweaters. Admittedly, I didn’t look very hard, but I couldn’t find a sweater that I liked both artistically and mathematically. However, I did stumble upon this T-shirt: https://www.amazon.com/Christmas-Math-Teacher-Tshirt-Lovers/dp/B077X14254/

I gave one to my wife and daughter, and it was a big hit.

However, I made the mistake of not inspecting the merchandise closely enough. About a minute after receiving her shirt, my daughter pointed at a digit in the sixth row of the decimal expansion and asked, “Shouldn’t this be a 5? Or maybe I’m mis-remembering.”

In that moment, I remembered that, a few years ago, she had memorized the first few dozen digits of $\pi$ for her elementary school’s talent show. Somehow, she had retained that bit of trivia all these years later. I didn’t miss the irony: I did not remember that she could remember the first few dozen digits of $\pi$.

As I’ve learned not to daughter my daughter’s memory, I checked two different references (https://www.piday.org/million/ and https://www.wolframalpha.com/input/?i=N%5BPi,1000%5D), and, sure enough, she was right.

The shirt correctly wrote the first 47 digits of $\pi$ after the decimal point. But things went haywire after that. Not only did was the T-shirt’s 48th digit incorrect, but it skipped a few hundred digits in the decimal expansion of $\pi$ before picking it up again! Furthermore, after completing the “tree,” a few thousand more digits were skipped before constructing the base of the tree. And these latter digits were used twice!

The first 4,000 digits of $\pi$ are shown below (in blocks of 10 digits). The ones that appear on the T-shirt are marked in boldface and are underlined.

3.
1415926535 8979323846 2643383279 5028841971 6939937
510 5820974944
5923078164 0628620899 8628034825 3421170679 8214808651 3282306647
0938446095 5058223172 5359408128 4811174502 8410270193 8521105559
6446229489 5493038196 4428810975 6659334461 2847564823 3786783165
2712019091 4564856692 3460348610 4543266482 1339360726 0249141273
7245870066 0631558817 4881520920 9628292540 9171536436 7892590360
0113305305 4882046652 1384146951 9415116094 3305727036 5759591953
0921861173 8193261179 3105118548 0744623799 6274956735 1885752724
8912279381 8301194912 9833673362 4406566430 8602139494 6395224737
1907021798 6094370277 0539217176 2931767523 8467481846 7669405132
0005681271 4526356082 7785771342 7577896091 7363717872 1468440901
2249534301 4654958537 1050792279 6892589235 4201995611 2129021960
8640344181 5981362977 4771309960 5187072113 4999999837 2978049951
0597317328 1609631859 5024459455 3469083026 4252230825 3344685035
2619311881 7101000313 7838752886 5875332083 8142061717 7669147303
5982534904 2875546873 1159562863 8823537875 9375195778 1857780532
1712268066 1300192787 6611195909 2164201989 3809525720 1065485863
2788659361 5338182796 8230301952 0353018529 6899577362 2599413891
2497217752 8347913151 5574857242 4541506959 5082953311 6861727855
8890750983 8175463746 4939319255 0604009277 0167113900 9848824012
8583616035 6370766010 4710181942 9555961989 4676783744 9448255379
7747268471 0404753464 6208046684 2590694912 9331367702 8989152104
7521620569 6602405803 8150193511 2533824300 3558764024 7496473263
9141992726 0426992279 6782354781 6360093417 2164121992 4586315030
2861829745 5570674983 8505494588 5869269956 9092721079 7509302955
3211653449 8720275596 0236480665 4991198818 3479775356 6369807426
5425278625 5181841757 4672890977 7727938000 8164706001 6145249192
1732172147 7235014144 1973568548 1613611573 5255213347 5741849468
4385233239 0739414333 4547762416 8625189835 6948556209 9219222184
2725502542 5688767179 0494601653 4668049886 2723279178 6085784383
8279679766 8145410095 3883786360 9506800642 2512520511 7392984896
0841284886 2694560424 1965285022 2106611863 0674427862 2039194945
0471237137 8696095636 4371917287 4677646575 7396241389 0865832645
9958133904 7802759009 9465764078 9512694683 9835259570 9825822620
5224894077 2671947826 8482601476 9909026401 3639443745 5305068203
4962524517 4939965143 1429809190 6592509372 2169646151 5709858387
4105978859 5977297549 8930161753 9284681382 6868386894 2774155991
8559252459 5395943104 9972524680 8459872736 4469584865 3836736222
6260991246 0805124388 4390451244 1365497627 8079771569 1435997700
1296160894 4169486855 5848406353 4220722258 2848864815 8456028506
0168427394 5226746767 8895252138 5225499546 6672782398 6456596116
3548862305 7745649803 5593634568 1743241125 1507606947 9451096596
0940252288 7971089314 5669136867 2287489405 6010150330 8617928680
9208747609 1782493858 9009714909 6759852613 6554978189 3129784821
6829989487 2265880485 7564014270 4775551323 7964145152 3746234364
5428584447 9526586782 1051141354 7357395231 1342716610 2135969536
2314429524 8493718711 0145765403 5902799344 0374200731 0578539062
1983874478 0847848968 3321445713 8687519435 0643021845 3191048481
0053706146 8067491927 8191197939 9520614196 6342875444 0643745123
7181921799 9839101591 9561814675 1426912397 4894090718 6494231961
5679452080 9514655022 5231603881 9301420937 6213785595 6638937787
0830390697 9207734672 2182562599 6615014215 0306803844 7734549202
6054146659 2520149744 2850732518 6660021324 3408819071 0486331734
6496514539 0579626856 1005508106 6587969981 6357473638 4052571459
1028970641 4011097120 6280439039 7595156771 5770042033 7869936007
2305587631 7635942187 3125147120 5329281918 2618612586 7321579198
4148488291 6447060957 5270695722 0917567116 7229109816 9091528017
3506712748 5832228718 3520935396 5725121083 5791513698 8209144421
0067510334 6711031412 6711136990 8658516398 3150197016 5151168517
1437657618 3515565088 4909989859 9823873455 2833163550 7647918535
8932261854 8963213293 3089857064 2046752590 7091548141 6549859461
6371802709 8199430992 4488957571 2828905923 2332609729 9712084433
5732654893 8239119325 9746366730 5836041428 1388303203 8249037589
8524374417 0291327656 1809377344 4030707469 2112019130 2033038019
7621101100 4492932151 60
84244485 9637669838 9522868478 3123552658
2131449576 8572624334 4189303968 6426243410 7732269780 2807318915
4411010446 8232527162 0105265227 2111660396…

I can understand getting a digit or two wrong on the T-shirt, but I have no idea how anybody could have possibly made a mistake like this.

Upon discovering this, my first reaction reflected my inner mathematician: “I want a refund.” After all, $\pi$ has been known to 47 decimal places since the 1700s, long before the advent of modern computers. However, upon further reflection, I decided that being able to tell this story of a Christmas $\pi$ T-shirt that incorrectly printed the digits of $\pi$ — and especially the story of how this error was brought to my attention — was by itself well worth the price of the shirt.

# How Mathematicians Tip

While funny, it’s usually courteous (at least in the United States) to tip a server more than 11.7% if given good service at restaurant.

# Pi vs. Pie

Courtesy Bedtime Math:

# Pi Day of the Century

In case you have nothing better to read, here’s the first million digits of pi: http://www.piday.org/million/

And, as a reminder, I’ll be at the Pi Day of the Century event at the North Branch of the Denton library:

# Local Pi Day Event

As has been well publicized, tomorrow is the Pi Day of the Century (3/14/15). I actually know someone who intentionally planned her wedding for tomorrow morning at 9:26 am.

The North Branch of the Denton library will be holding a Pi Day event from 9:26 am until 5:35 pm, and I’ll be making four presentations (two for grade school children and two for teens/adults). You’re welcome to bring the family and enjoy as your schedule permits.

# Was There a Pi Day on 3/14/1592?

March 14, 2015 has been labeled the Pi Day of the Century because of the way this day is abbreviated, at least in America: 3/14/15.

I was recently asked an interesting question: did any of our ancestors observe Pi Day about 400 years ago on 3/14/1592? The answer is, I highly doubt it.

My first thought was that $\pi$ may not have been known to that many decimal places in 1592. However, a quick check on Wikipedia (see also here), as well as the book “$\pi$ Unleashed,” verifies that my initial thought was wrong. In China, 7 places of accuracy were obtained by the 5th century. By the 14th century, $\pi$ was known to 13 decimal places in India. In the 15th century, $\pi$ was calculated to 16 decimal places in Persia.

It’s highly doubtful that the mathematicians in these ancient cultures actually talked to each other, given the state of global communications at the time. Furthermore, I don’t think any of these cultures used either the Julian calendar or the Gregorian calendar (which is in near universal use today) in 1592. (An historical sidebar: the Gregorian calendar was first introduced in 1582, but different countries adopted it in different years or even centuries. America and England, for example, did not make the switch until the 18th century.) So in China, India, and Persia, there would have been nothing particularly special about the day that Europeans called March 14, 1592.

However, in Europe (specifically, France), Francois Viete derived an infinite product for $\pi$ and obtained the first 10 digits of $\pi$. According to Wikipedia, Viete obtained the first 9 digits in 1579, and so Pi Day hypothetically could have been observed in 1592. (Although $\pi$ Unleashed says this happened in 1593, or one year too late).

There’s a second problem: the way that dates are numerically abbreviated. For example, in England, this Saturday is abbreviated as 14/3/15, which doesn’t lend itself to Pi Day. (Unfortunately, since April has only 30 days, there’s no 31/4/15 for England to mark Pi Day.) See also xkcd’s take on this. So numerologically minded people of the 16th century may not have considered anything special about March 14, 1592.

The biggest obstacle, however, may be the historical fact that the ratio of a circle’s circumference and diameter wasn’t called $\pi$ until the 18th century. Therefore, both serious and recreational mathematicians would not have called any day Pi Day in 1592.

# Approximating pi

I was recently interviewed by my city’s local newspaper about $\pi$ Day and the general fascination with memorizing the digits of $\pi$. I was asked by the reporter if the only constraint in our knowledge of the digits of $\pi$ was the ability of computers to calculate the digits, and I answered in the affirmative.

Here’s the current state-of-the-art for calculating the digits of $\pi$. Amazingly, this expression was discovered  1995… in other words, very recently.

$\pi = \displaystyle \sum_{n=0}^\infty \frac{1}{16^n} \left( \frac{4}{8n+1} - \frac{2}{8n+4} - \frac{1}{8n+5} - \frac{1}{8n+6} \right)$

Because of the term $16^n$ in the denominator, this infinite series converges very quickly.

Proof: If $k < 8$, then we calculate the integral $I_k$, defined below:

$I_k = \displaystyle \int_0^{1/\sqrt{2}} \frac{x^{k-1}}{1-x^8} dx$

$= \displaystyle \int_0^{1/\sqrt{2}} x^{k-1} \sum_{n=0}^\infty x^{8n} dx$

$= \displaystyle \int_0^{1/\sqrt{2}} \sum_{n=0}^\infty x^{8n+k-1} dx$

$= \displaystyle \sum_{n=0}^\infty \int_0^{1/\sqrt{2}} x^{8n+k-1} dx$

$= \displaystyle \sum_{n=0}^\infty \left[ \frac{x^{8n+k}}{8n+k} \right]^{1/\sqrt{2}}_0$

$= \displaystyle \sum_{n=0}^\infty \frac{1}{8n+k} \left[ \left( \frac{1}{\sqrt{2}} \right)^{8n+k} - 0 \right]$

$= \displaystyle \sum_{n=0}^\infty \frac{1}{2^{k/2}} \frac{1}{16^n (8n+k)}$

We now form the linear combination $P = 4\sqrt{2} I_1 - 8 I_4 - 4\sqrt{2} I_5 - 8 I_6$:

$P = \displaystyle \sum_{n=0}^\infty \left( \frac{4\sqrt{2}}{2^{1/2}} \frac{1}{16^n (8n+1)} - \frac{8}{2^{4/2}} \frac{1}{16^n (8n+4)} - \frac{4\sqrt{2}}{2^{5/2}} \frac{1}{16^n (8n+5)} - \frac{8}{2^{6/2}} \frac{1}{16^n (8n+6)} \right)$

$P = \displaystyle \sum_{n=0}^\infty \frac{1}{16^n} \left( \frac{4}{8n+1} - \frac{2}{8n+4} - \frac{1}{8n+5} - \frac{1}{8n+6} \right)$

Also, from the original definition of the $I_k$,

$P = \displaystyle \int_0^{1/\sqrt{2}} \frac{4\sqrt{2} - 8x^3 -4\sqrt{2} x^4 - 8x^5}{1-x^8} dx$.

Employ the substitution $x = y/\sqrt{2}$:

$P = \displaystyle \int_ 0^1 \frac{4\sqrt {2} - 2\sqrt {2} y^3 - \sqrt {2} y^4 - \sqrt {2} y^5}{1 - y^8/16}\frac {dy} {\sqrt {2}}$

$P = \displaystyle \int_ 0^1 \frac{16 (4 - 2 y^3 - y^4 - y^5)}{16 - y^8} dy$

$P = \displaystyle \int_0^1 \frac{16(y-1)(y^2+2)(y^2+2y+2)}{(y^2-2)(y^2+2)(y^2+2y+2)(y^2-2y+2)} dy$

$P = \displaystyle \int_0^1 \frac{16y-16}{(y^2-2)(y^2-2y+2)} dy$

Using partial fractions, we find

$P = \displaystyle \int_ 0^1\frac{4 y}{y^2 - 2} dy - \int_ 0^1 \frac{4 y - 8}{y^2 - 2 y + 2} dy$

The expression on the right-hand side can be simplified using standard techniques from Calculus II and is equal to $\pi$.

So that’s the proof… totally accessible to a student who has mastered concepts in Calculus II. But this begs the question: how in the world did anyone come up with the idea of starting with the integrals $I_k$ to develop an infinite series that leads to $\pi$? Let me quote from page 118 of J. Arndt and C. Haenel, $\pi -$ Unleashed (Springer, New York, 2000):

Certainly not by chance, even if luck played some part in the discovery. All three parties [David Bailey, Peter Borwein and Simon Plouffe] are established mathematicians who have been working with the number $\pi$ for a considerable time… Yet the series was not discovered through mathematical deduction or inference. Instead, the researchers used a tool called Computer Algebra System and a particular procedure called the “PSQL algorithm” to generate their series. They themselves write that they found their formula “through a combination of inspired testing and extensive searching.”

The original paper that announced the discovery of this series can be found at http://www.cecm.sfu.ca/personal/pborwein/PAPERS/P123.pdf.