# How to compute the multiplicative inverse of a series?

After a formula of Sergei N. Gladkovskii the logarithm of the generating function for the Pell numbers is the multiplicative inverse of sqrt(2) coth(sqrt(2) x)-1 seen as an exponential generating function.

In the words of Maple:

```
seq(k!*coeff(series(1/(sqrt(2)*coth(sqrt(2)*x)-1),x=0,k+2),x,k),k=0..9);
0, 1, 2, 2, -8, -56, -112, 848, 9088, 25216
```

How can I do this with Sage?

**Added:**

If I want a *compositional inverse* this is what I do:

SR -> taylor -> PowerSeriesRing(SR) -> reversion() -> egf_to_ogf() -> padded_list()

If I want a *multiplicative inverse* this is what I want to do:

SR -> taylor -> PowerSeriesRing(SR) -> inversion() -> egf_to_ogf() -> padded_list()

Isn't this what one expects naturally? But I cannot find an 'inversion'.

**Solution d'après kcrisman**

```
x = SR.var('x')
gf = (sqrt(2)*coth(sqrt(2)*x)-1)^-1
taylor(gf,x,0,9).power_series(SR).egf_to_ogf().padded_list()
```

Following a hint of kcrisman I found in the code the function "__invert__(self)". This is exactly what I have been looking for. To support functional notation and to make terminology more uniform and predictable it would be nice to have an function-alias inversion() for this function.

This is now trac #17403