5. Find all natural numbers $n$ such that $n$ has as many digits as it has distinct prime divisors, and the sum of the distinct prime divisors is equal to the sum of the powers of the same divisors.
Solution. Let $n=p_{1}^{\alpha_{1}} p_{2}^{\alpha_{2}} \ldots p_{k}^{\alpha_{k}}$. From the condition of the problem, we have

$$
p_{1}+p_{2}+\ldots+p_{k}=\alpha_{1}+\alpha_{2}+\ldots+\alpha_{k}
$$

We consider the number of digits of the number $n$. If it has 4 digits, then it has 4 different prime divisors. Then $n \geq 2^{14} \cdot 3 \cdot 5 \cdot 7>10^{4}$, which is not possible. If $n$ has $k>4$ digits, then

$$
\begin{aligned}
n & \geq 2^{2+3+5+7+p_{5}+\ldots+p_{k}-(k-1)} \cdot 3 \cdot 5 \cdot 7 \cdot p_{5} \cdot \ldots \cdot p_{k} \\
& =2^{14} \cdot 3 \cdot 5 \cdot 7 \cdot 2^{p_{5}+\ldots+p_{k}-(k-4)} p_{5} \cdot \ldots \cdot p_{k} \\
& >10^{4} \cdot 10^{k-4}=10^{k}
\end{aligned}
$$

which is again not possible. Therefore, $n$ is at most a three-digit number.

Let $n$ be a three-digit number. Then $n=p_{1}^{\alpha_{1}}{p_{2}}^{\alpha_{2}}{p_{3}}^{\alpha_{3}}$. If $5 \mid n$, then

$$
n \geq 2^{8} \cdot 3 \cdot 5>10^{3}
$$

We conclude that the prime factors of $n$ are less than or equal to 3. However, the only prime numbers less than or equal to 3 are 2 and 3, and there are 3 prime numbers in the factorization of $n$, which is a contradiction.

Let $n$ be a two-digit number. Then $n=p_{1}^{\alpha_{1}}{p_{2}}^{\alpha_{2}}$. If $5 \mid n$, then

$$
n \geq 2^{6} \cdot 5>10^{2}
$$

Thus, $n=2^{\alpha_{1}} 3^{\alpha_{2}}$, where $\alpha_{1}+\alpha_{2}=5$. By direct verification, we find that

$$
n=2^{4} \cdot 3=48, n=2^{3} \cdot 3^{2}=72
$$

are solutions.

Let $n$ be a one-digit number. Then only $n=2^{2}$ satisfies the condition of the problem.