If I have a normal product, everything works well:
sage: product(x,x,2,3)
6
But if I have a function inside the product term, I get a value error:
sage: product(nth_prime(x),x,2,3)
ValueError: cannot convert x to int
sage: product(nth_prime(ZZ(x)),x,2,3)
TypeError: unable to convert x to an integer
The output should be
sage: nth_prime(2)*nth_prime(3)
15