4. A deck of tri-color cards, consisting of 32 cards in total, has 10 cards of each color: red, yellow, and blue, numbered $1, 2, \cdots, 10$; there are also a big joker and a small joker, each numbered 0. From this deck, several cards are drawn, and the score is calculated as follows: each card with a number $k$ is worth $2^k$ points. If the total score of these cards is 2004, they are called a "good card group." Determine the number of "good card groups."
(Provided by Tao Pingsheng)
$4.1003^{2}$.
Solution 1: Call the original problem the "Two Kings Problem". If an additional card (called the "Middle King") is added, with the number also being 0, and the same problem is considered, it is called the "Three Kings Problem".

First, consider the "Three Kings Problem". The large, medium, and small three kings are respectively called the Red King, Yellow King, and Blue King. Thus, each color of cards is 11 cards, numbered $0,1,2, \cdots, 10$. Let the number of card groups with a total score of $n$ be denoted as $u_{n}$, and each card group can be composed of the Red Group, Yellow Group, and Blue Group. Let the total scores of the Red Group, Yellow Group, and Blue Group be denoted as $x, y, z$, respectively, then
$$
x+y+z=n .
$$

Since the binary representation of any non-negative integer is unique, once the values of $x, y, z$ are determined, the composition of the Red Group, Yellow Group, and Blue Group is uniquely determined. The number of non-negative integer solutions to the equation $x+y+z=n$ is equal to $\mathrm{C}_{n+2}^{2}$, so,
$$
u_{n}=C_{n+2}^{2}=\frac{(n+1)(n+2)}{2} \text {. }
$$

Now consider the original "Two Kings Problem". For $n \in\{1,2, \cdots, 2004\}$, let $a_{n}$ denote the number of card groups with a total score of $n$.

When $n=2 k \leqslant 2004$, for any card group with a total score of $2 k$, we have:
(1) If the group does not contain a king card, then this card group is a card group in the "Three Kings Problem" with a total score of $2 k$ and no king cards. If the score of each card in the group is divided by 2, it becomes a card group in the "Three Kings Problem" with a total score of $k$ and allows for the inclusion of king cards. It is easy to see that this correspondence is one-to-one, so the number of such card groups is $u_{k}$.
(2) If the group contains a king card, then the group must contain 2 king cards (both the big and small king cards are in the group). Removing the king cards, it reduces to a card group with a total score of $2 k-2$ and no king cards. Thus, the number of such card groups is $u_{k-1}$. Therefore,
$$
\begin{array}{l}
a_{2 k}=u_{k}+u_{k-1}=\frac{(k+1)(k+2)}{2}+\frac{k(k+1)}{2} \\
=(k+1)^{2}, k=1,2, \cdots, 1002 .
\end{array}
$$

In particular, the number of "good card groups" is
$$
a_{2004}=1003^{2}=1006009 \text {. }
$$

Solution 2: For $n \in\{1,2, \cdots, 2004\}$, let $a_{n}$ denote the number of card groups with a total score of $n$, then $a_{n}$ is equal to the coefficient of $x^{n}$ in the expansion of the function
$$
f(x)=\left(1+x^{2^{0}}\right)^{2}\left(1+x^{2^{1}}\right)^{3}\left(1+x^{2^{2}}\right)^{3} \cdots\left(1+x^{2^{10}}\right)^{3}
$$

(assuming $|x|<1$). Since
$$
\begin{aligned}
f(x) & =\frac{1}{1+x}\left[\left(1+x^{2^{0}}\right)\left(1+x^{1^{1}}\right)\left(1+x^{2^{2}}\right) \cdots\left(1+x^{2^{10}}\right)\right]^{3} \\
= & \frac{1}{(1+x)(1-x)^{3}}\left(1-x^{2^{11}}\right)^{3}=\frac{1}{\left(1-x^{2}\right)(1-x)^{2}}\left(1-x^{2^{11}}\right)^{3},
\end{aligned}
$$

and $n \leqslant 2004<2^{11}$, so $a_{n}$ is equal to the coefficient of $x^{n}$ in the expansion of $\frac{1}{\left(1-x^{2}\right)(1-x)^{2}}$. Also,
$$
\begin{array}{l}
\frac{1}{\left(1-x^{2}\right)(1-x)^{2}}=\frac{1}{1-x^{2}} \cdot \frac{1}{(1-x)^{2}} \\
=\left(1+x^{2}+x^{4}+\cdots+x^{2 k}+\cdots\right) . \\
\left(1+2 x+3 x^{2}+\cdots+(2 k+1) x^{2 k}+\cdots\right),
\end{array}
$$

thus, the coefficient of $x^{2 k}$ is
$$
a_{2 k}=1+3+5+\cdots+(2 k+1)=(k+1)^{2}, k=1,2, \cdots \text {. }
$$

Therefore, the number of "good card groups" is
$$
a_{2004}=1003^{2}=1006009 .
$$