Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Sage's simplify() command is very basic; it just sends to Maxima and back, which does simplify a few things. More generally, Sage has a lot of specific simplification routines from Maxima that you can use. In this case, we have success!

sage: P = lambda n: hypergeometric([-n,-n+1],[2], 1/x).simplify_hypergeometric()
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]