30. 20 identical balls are placed into 4 identical boxes, with no box left empty. How many ways are there to do this? If empty boxes are allowed, how many ways are there?
30. 20 identical balls, 4 identical boxes, solutions for no empty boxes and allowing empty boxes, i.e., find
$$
f(x)=\frac{1}{(1-x)\left(1-x^{2}\right)\left(1-x^{3}\right)\left(1-x^{4}\right)},
$$

expanding the coefficients of $x^{16}$ and $x^{20}$. This expansion is not easy, so we let
$$
G(x)=(1-x)\left(1-x^{2}\right)\left(1-x^{3}\right)\left(1-x^{4}\right),
$$

then
$$
\begin{array}{c}
f(x) \cdot G(x)=1, \\
f(x)=f_{0}+f_{1} x+\cdots+f_{n} x^{n}+\cdots, \\
G(x)=1-x-x^{2}+2 x^{5}-x^{8}-x^{9}+x^{10},
\end{array}
$$

From $\left(f_{0}+f_{1} x+\cdots+f_{n} x^{n}+\cdots\right)\left(1-x-x^{2}+2 x^{5}-x^{8}-x^{9}+x^{10}\right)=1$, we get the recurrence relation for $f_{n}$: $f_{n}-f_{n-1}-f_{n-2}+2 f_{n-5}-f_{n-8}-f_{n-9}+f_{n-10}=0$,
$$
f_{n}=f_{n-1}+f_{n-2}-2 f_{n-5}+f_{n-8}+f_{n-9}-f_{n-10} .
$$

Using the recurrence relation, we can compute the values of $f_{16}=64$ and $f_{20}=108$.
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline$n$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & $\cdots$ & 16 & $\cdots$ & 20 \\
\hline$f_{n-1}$ & 1 & 1 & 2 & 3 & 5 & 6 & 9 & 11 & 15 & 18 & $\cdots$ & 54 & $\cdots$ & 94 \\
\hline$f_{n-2}$ & & 1 & 1 & 2 & 3 & 5 & 6 & 9 & 11 & 15 & & 47 & & 84 \\
\hline$f_{n-5}$ & & & & & 1 & 1 & 2 & 3 & 5 & 6 & & 27 & & 54 \\
\hline$f_{n-8}$ & & & & & & & & 1 & 1 & 2 & & 15 & & 34 \\
\hline$f_{n-9}$ & & & & & & & & & 1 & 1 & & 11 & & 27 \\
\hline$f_{n-10}$ & & & & & & & & & & 1 & & 9 & & 23 \\
\hline$f_{n}$ & 1 & 2 & 3 & 5 & 6 & 9 & 11 & 15 & 18 & 23 & $\cdots$ & 64 & $\cdots$ & 108 \\
\hline
\end{tabular}