a = 0 A = 13591409 B = 545140134 C = 640320 for k in range(0,100): top = -1^k*fact(6*k)*(A+B*k) bottom = fact(3*k)*fact(k)^3*C^(3*k+3/2) a = a + top/bottom print "a: ", a print "top:", top print "bottom:", bottom print "pi:", 1 / ( 12 * a)