# Finding the coefficient of multivariable generating function

I want to find the coefficient of $[a^3b^3c^3]$ in the expansion of $$\bigg[1-\bigg(\frac{a+a^2}{1-(a+a^2)}+\frac{b+b^2}{1-(b+b^2)}+\frac{c+c^2}{1-(c+c^2)}\bigg)\bigg]^{(-1)}$$

I have made research on internet about coefficient of this multivariable generating function, but could not find something valuable. Can you help me to calculate the coefficent using Sagemath ?

edit retag close merge delete

Sort by ยป oldest newest most voted

For example:

myprec = 10
def f(z):
return t/(1-t)

R.<a,b,c> = PowerSeriesRing(QQ,default_prec=myprec)
g = (1-(f(a)+f(b)+f(c)))^(-1)
print( g.coefficients()[a^3*b^3*c^3] )


For small degrees, default_prec= and .add_bigoh() are not really needed but they will speed up things / save memory when degrees of interest are large.

more

thanks a lot

( 2023-08-10 19:39:44 +0200 )edit

@Max Alekseyev , i want to add something. Assume that i want to calculate g = (1-x(f(a)+f(b)+f(c)))^(-1) where print( g.coefficients()[x^9a^3b^3c^3] ). It did not work, how can i handle it ?

( 2023-08-10 20:49:28 +0200 )edit

You need to define x first. E.g.:

K.<x> = QQ[]
R.<a,b,c> = PowerSeriesRing(K,default_prec=myprec)
g = (1-x*(f(a)+f(b)+f(c)))^(-1)

( 2023-08-10 22:43:36 +0200 )edit