# Revision history [back]

### 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?

### 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)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?

### 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?

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'.

### 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?

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

 5 retagged FrédéricC 3139 ●3 ●33 ●61

### 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?

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