Maybe this bit from the docstring is causing confusion:
When x is a polynomial f of a single variable y of order >= 1,
rf(x,k) = f(y) * f(y+1) * ... * f(x+k-1) as described in
Peter Paule, "Greatest Factorial Factorization and Symbolic Summation",
Journal of Symbolic Computation, vol. 20, pp. 235-268, 1995.
So rf(x**3, 2) is x**3*(x + 1)**3.
I'm not sure why this definition is made. It seems like a bad one,
since there are two different ways to interpret rf(a, b) if a is a
polynomial. It looks like this was changed in
https://github.com/sympy/sympy/pull/8941.
For the other two, I get the same thing as the docstring in SymPy 1.0
>>> rf(x, k).rewrite(binomial)
binomial(k + x - 1, k)*factorial(k)
>>> rf(n, k).rewrite(factorial)
factorial(k + n - 1)/factorial(n - 1)
These seem mathematically correct.
It seems all three of these changed from SymPy 0.7.6 to SymPy 1.0.
Aaron Meurer
>
https://groups.google.com/d/msgid/sympy/ad6fe0f9-d9b2-411a-ba3d-dc4b9378655a%40googlegroups.com.