Question: Partial Fraction expansion of a bivariate GF

Hi, I have a bivariate generating function that looks like this

x/((1-x)*(2-x-x^k))

where x is enumerating by binary strings by length and k is counting a number patterns in the string. I would like to convert the series into partial fractions. Convert[parfrac] only seems to work when k is given a value, which I did for several small small choices, from which I guessed the general partial fraction decomposition. Would someone have an idea on how to extract the partial fractions directly in terms of x and k?

Thanks,

best, Luke

Please Wait...