Where am I making mistake in trying find the $[x^n]$ of a given generating function?

41 Views Asked by At

I'm trying to find the $[x^n]$ from a sequence below:

$$1, \frac{3}{2}, \frac{7}{3}, \frac{13}{4}, \frac{21}{5}, \frac{31}{6}, ...$$

I figured out the following sum generates that series:

$$R(x) = \sum_{k=0}^n \frac{(k+1)^2 - k}{k+1} . x^k$$

Rearranging the sum:

$$R(x) = \sum_{k=0}^n \frac{(k+1)^2}{k+1} . x^k - \sum_{k=0}^n \frac{k}{k+1} . x^k$$

$$R(x) = \sum_{k=0}^n (k+1) . x^k - \sum_{k=0}^n \frac{k}{k+1} . x^k$$

Let $F(x)$ and $H(x)$ to be the sums above respectively:

$$R(x) = F(x) - H(x)$$

Considering a known generating function $L(x)$:

$$L(x) = \ln \left(\frac{1}{1-x}\right)$$

and by making some manipulations I get:

$$F(x) = \frac{1}{(1-x)^2}$$

$$H(x) = \dfrac{d}{dx} \left(\frac{L(x)}{x}\right)x $$

Calculating I get:

$$H(x) = \frac{1}{1-x} - \frac{\ln \left(\frac{1}{1-x}\right)}{x}$$

To finish we have:

$$R(x) = \frac{1}{(1-x)^2} + \frac{1}{1-x} - \frac{\ln \left(\frac{1}{1-x}\right)}{x}$$

I've skipped some steps to save space.

It seems to me the answer is not correct. I was wondering at what point I'm failing.. Does anyone here can help me?

1

There are 1 best solutions below

1
On

Just a sign error on the last row: $R=F\color{red}{-}H$.

Note also that $\log(\frac1{1-x})=-\log(1-x)$, slightly simpler.