4. Find all natural numbers \( n \) for which the following equality holds:

\[
n + d(n) + d(d(n)) + \cdots = 2021
\]

where \( d(0) = d(1) = 0 \) and for \( k > 1 \), \( d(k) \) is the superdivisor of \( k \) (i.e., its greatest divisor \( d \) with the property \( d < k \)).

(Tomáš Bárta)
SOLUTION. Similarly to the home problem, we use the fact that for the superdivisor $d(m)$ of an integer $m>1$, the formula $d(m)=m / p$ holds, where $p$ is the smallest prime factor of the number $m$.

Let's factorize the sought $n$ into primes: $n=p_{1} p_{2} \ldots p_{k}$, where $p_{1} \geqq p_{2} \geqq \ldots \geqq p_{k}$ are prime numbers. Then, thanks to the initial fact, we can rewrite the equality from the problem in the form

$$
p_{1} \ldots p_{k}+p_{1} \ldots p_{k-1}+p_{1} \ldots p_{k-2}+\cdots+p_{1} p_{2}+p_{1}+1=2021
$$

After subtracting the number 1 and factoring out on the left side step by step, we get

$$
p_{1}\left(1+p_{2}\left(1+p_{3}\left(1+\cdots+p_{k-1}\left(1+p_{k}\right) \ldots\right)\right)\right)=2020
$$

We see that $p_{1} \mid 2020=101 \cdot 5 \cdot 2 \cdot 2$. Since $p_{1}$ is a prime number, we have 3 possibilities:

a) $p_{1}=101$. From (1) it follows that $1+p_{2}(\ldots)=20$, so $p_{2} \mid 19$, and thus $p_{2}=19$ (and $k=2$), which, due to $101>19$, indeed leads to the solution $n=101 \cdot 19=1919$.

b) $p_{1}=5$. From (1) it follows that $1+p_{2}(\ldots)=404$, so $p_{2} \mid 403$. According to $5=p_{1} \geqq p_{2}$, the prime number $p_{2}$ can only be 2, 3, or 5, but it is not a divisor of the number $403=13 \cdot 31$.
c) $p_{1}=2$. From (1) it follows that $1+p_{2}(\ldots)=1010$, so $p_{2} \mid 1009$. This, however, contradicts the fact that according to $2=p_{1} \geqq p_{2}$, $p_{2}=2$.

Conclusion. The only number that satisfies the condition is $n=1919$.