Kevin Ryde on Sat, 21 Jul 2018 10:42:36 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

generating function solution to poly

I have a generating function (and more terms too)

    g = x^2 + x^3 + x^4 + 3*x^5 + 6*x^6 + 12*x^7 + 29*x^8 + 67*x^9 + O(x^10);

which satisfies a cubic

    (1+x)*g^3 - 2*g^2 + (1-x+2*x^2)*g - x^2 == 0

Is there an easy or good way to have gp solve that for series g?

I know how to work upwards to get g term by term (after deciding lowest
should be 0), but maybe gp already has it.  I wondered only for interest
or generality though, since this one comes from recurrences which are
easy to calculate.  I attempted serreverse() without joy (change
variables to solve in x, but I may have confused myself).