3.20 Solve the recurrence $a_n=3a_{n-1}-3a_{n-2}+a_{n-3}\quad \ \text{for} \ n>2 \ \text{with} \ a_0=a_1=0 \ \text{and} \ a_2=1$.

This gives: $$g(z) = 1-z+3z^2-3z^3 = (1 - z)(1 + 3z^2)$$

and $$f(z) = z^2 \ g(z) \ (mod \ z^3) = (z^2 - z^3) \ (1 + 3z^2) \ (mod \ z^3) = z^2$$

so $$\eqalign{a(z) = \frac{f(z)}{g(z)} &= \frac{z^2}{(1 - z)(1 + 3z^2)}\\ &= \frac{1}{(1-z)} . \frac{z^2}{1+3z^2}}$$

Then, I give up

Solve the same recurrence with the initial condition on $a_1$ changed to $a_1 = 1$:

$g(z)$ has same value, but $f(z)$ changed into:

$$f(z) = (z+z^2) \ g(z) \ (mod \ z^3) = (z+z^2) \ (1 - z)(1 + 3z^2) \ (mod \ z^3) = z$$

so,

$$\eqalign{a(z) = \frac{f(z)}{g(z)} &= \frac{z}{(1 - z)(1 + 3z^2)}\\ &= \frac{1}{(1-z)} . \frac{z}{1+3z^2}\\ &= \frac{1}{3} \big(\frac{1}{(1+3z^2)} - \frac{1}{1-z} \big) }$$

That gives us:

$$\eqalign{a(n) &= \frac{1}{3}(3^nz^{2n} - z^n)\\ &= \frac{1}{3}(3^n - 1) }$$

3.28 Find an expression for $[z^n]{1\over\sqrt{1-z}}\ln{1\over1-z}$.

Hint. Expand $(1-z)^{-\alpha}$ and differentiate with respect to $\alpha$.