Celebrate Pi Day With Some Math

image_pdfSave to pdf fileimage_printPrint

[Updated 3.15 with this delicious photo and comment.]

Pi plus one

From Iowahawk on Twitter (@iowahawkblog)

Correction: Happy lim[n→∞] 2^4n / (n * (2n! / (2*(n!)))^2) Day

#PiDay How to bake your own converging pi in Excel:

  1. let cell A1 = value of n
  2. in cell B1, enter the formula =EXP(4*A1*LN(2) – LN(A1) – (2*(GAMMALN(2*A1+1) – 2* GAMMALN(A1+1))))
  3. enter larger and larger values for n in cell A1, or create a column series

And voila: convergence through n=20 #PiDay


[A small explanation]

@BunceHoratio it’s a handy dandy function for formulas that involve factorials.

n! = Gamma(n+1) = exp(ln(Gamma(n+1)), or in Excel parlance =exp(GammaLn(n+1))

[But there’s a problem via David Rinaldo @valid_android]

@iowahawkblog This breaks around n=20000000000000 says 2.7 (yes I know why)

[Mr. Hawk replies]

@Valid_Android Because Bill Gates is a punkass bitch

@triadaxiom Blame Microsoft’s shitty precision, not math




Share if you feel like it

About Tony Lima

Retired after teaching economics at California State Univ., East Bay (Hayward, CA). Ph.D., economics, Stanford. Also taught MBA finance at the California University of Management and Technology. Occasionally take on a consulting project if it's interesting. Other interests include wine and technology.