6. Given the sequence $\left\{a_{n}\right\}$ satisfies:
$$
a_{1}=1, a_{n+1}=\frac{(n+1) a_{n}}{2 n+a_{n}}\left(n \in \mathbf{Z}_{+}\right) \text {. }
$$

Then $\sum_{k=1}^{2021} \frac{k}{a_{k}}=$ . $\qquad$
6. $2^{2022}-2023$.

Given $a_{n+1}=\frac{(n+1) a_{n}}{2 n+a_{n}}$
$\Rightarrow \frac{n+1}{a_{n+1}}=\frac{2 n}{a_{n}}+1$.
Let $b_{n}=\frac{n}{a_{n}}$. Then $b_{n+1}=2 b_{n}+1$.
It is easy to see that, $b_{n}=2^{n}-1$.
Therefore, $\sum_{k=1}^{2021} \frac{k}{a_{k}}=\sum_{k=1}^{2021} b_{k}=2^{2022}-2023$.