def factorialPower(n): p = Polynomial(1) for i in xrange(1, n + 1): p = p.times(Polynomial(1 - i, 1)) p.removeTrailingZeroes() return p