Ask Your Question

Revision history [back]

As I have said in your other hypergeometric question, there is no need for sympy nor Maxima:

sage: from sage.functions.hypergeometric import closed_form
sage: P = lambda n: simplify(closed_form(hypergeometric([-n,-n+1],[2], 1/x)))
sage: [expand(x^k*P(k)) for k in (0..5)]
[1,
 x,
 x^2 + x,
 x^3 + 3*x^2 + x,
 x^4 + 6*x^3 + 6*x^2 + x,
 x^5 + 10*x^4 + 20*x^3 + 10*x^2 + x]

As I have said in your other hypergeometric question, there is no need for sympy nor Maxima:

sage: from sage.functions.hypergeometric import closed_form
sage: P = lambda n: simplify(closed_form(hypergeometric([-n,-n+1],[2], 1/x)))
sage: [expand(x^k*P(k)) for k in (0..5)]
[1,
 x,
 x^2 + x,
 x^3 + 3*x^2 + x,
 x^4 + 6*x^3 + 6*x^2 + x,
 x^5 + 10*x^4 + 20*x^3 + 10*x^2 + x]

Fixed in http://trac.sagemath.org/ticket/17066 which needs review.