I would like to compute sums with factorials using symbolic algebra in python. The simplest version of the problem I can generate is the following one:
from sympy.abc import j
from math import factorial
from sympy import summation
summation(factorial(j), (j, 1, 4))
And I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "sympy/core/expr.py", line 194, in __int__
r = self.round(2)
File "sympy/core/expr.py", line 3042, in round
raise TypeError('%s is not a number' % type(x))
TypeError: <class 'sympy.core.symbol.Symbol'> is not a number
Fundamentally, what I would like to compute is
summation(x**(j-1)/factorial(j-1), (j, 1, 3))
Any suggestion?