12. Let $n$ be a natural number, write $n$ as a sum of powers of $p$ (where $p$ is a positive integer greater than 1) and each power of $p$ can appear at most $p^{2}-1$ times, denote the total number of such decompositions as $C(n, p)$. For example: $8=4+4=4+2+2=4+2+1+1=2+2+2+1+1=8$, then $C(8,2)=5$. Note that in $8=4+1+1+1+1$, $1=2^{0}$ appears 4 times, which exceeds $2^{2}-1=3$, so it is not counted. Then $C(2002,17)=$ $\qquad$ .
12. 118

Let $17 n=e_{0}+17 e_{1}+17^{2} e_{2}+\cdots+17^{k} e_{k}$
be a partition of $17 n$, where $e_{0} \in\{0,17,2 \times 17, \cdots, 6 \times 17\}$
$e_{i} \in\{0,1,2, \cdots, 288\}, i=1,2, \cdots, k$
If $e_{0}=0$, then $e_{1}+17 e_{2}+\cdots+17^{k-1} e_{k}$ is a partition of $n$
Similarly: When $e_{i}=k^{*} \times 17$, then $e_{1}+17 e_{2}+\cdots+17^{k-1}, e_{k}$ is a partition of $n-k^{*}$, $k^{*}=1,2, \cdots, 16$
Therefore, $C(17 n, 17)=C(n, 17)+C(n-1,17)+\cdots+C(n-16,17)$
Similarly, $C(17 n+l, 17)=C(n, 17)+C(n-1,17)+\cdots+C(n-16,17)$ $=C(17 n, 17)$

Hence, from $C(1,17)=1$, recursively we get $C(n, 17)=\left[\frac{n}{17}\right]+1$
In particular, $C(2002,17)=118$