Repository: sympy/sympy

Issue:
exp(x).taylor_term(n, x) raises TypeError
When ```exp(x).taylor_term(n, x)``` is called, it raises ```TypeError``` because of a simple typo, instead of calling ```factorial(n)```, ```factorial()(n)``` is called, which is incorrect.

Discussion:

Patch:
diff --git a/sympy/functions/elementary/exponential.py b/sympy/functions/elementary/exponential.py
index 5bc5af8089..8b9881d7e3 100644
--- a/sympy/functions/elementary/exponential.py
+++ b/sympy/functions/elementary/exponential.py
@@ -301,7 +301,7 @@ def taylor_term(n, x, *previous_terms):
             p = previous_terms[-1]
             if p is not None:
                 return p * x / n
-        return x**n/factorial()(n)
+        return x**n/factorial(n)
 
     def as_real_imag(self, deep=True, **hints):
         """


Test patch:
diff --git a/sympy/functions/elementary/tests/test_exponential.py b/sympy/functions/elementary/tests/test_exponential.py
index 61991ec99d..279254d9dd 100644
--- a/sympy/functions/elementary/tests/test_exponential.py
+++ b/sympy/functions/elementary/tests/test_exponential.py
@@ -131,6 +131,10 @@ def test_exp_leading_term():
     assert exp(1/x).as_leading_term(x) == exp(1/x)
     assert exp(2 + x).as_leading_term(x) == exp(2)
 
+def test_exp_taylor_term():
+    x = symbols('x')
+    assert exp(x).taylor_term(1, x) == x
+    assert exp(x).taylor_term(3, x) == x**3/6
 
 def test_log_values():
     assert log(nan) == nan