9. (16 points) For positive integers $n(n \geqslant 2)$, let
$$
a_{n}=\sum_{k=1}^{n-1} \frac{n}{(n-k) 2^{k-1}} \text {. }
$$

Find the maximum value in the sequence $\left\{a_{n}\right\}$.
Sure, here is the translated text:

```
9. Calculate
$$
a_{2}=2, a_{3}=3, a_{4}=a_{5}=\frac{10}{3} \text {. }
$$

Below, we use mathematical induction to prove:
When $n \geqslant 5$, $a_{n} \leqslant \frac{10}{3}$.
Assume $a_{n} \leqslant \frac{10}{3}(n \geqslant 5)$.
Then $a_{n+1}=\sum_{k=1}^{n} \frac{n+1}{(n+1-k) 2^{k-1}}$
$$
\begin{array}{l}
=\frac{n+1}{n}+\frac{n+1}{2 n} a_{n} \leqslant \frac{n+1}{n} \times \frac{8}{3} \\
\leqslant \frac{6}{5} \times \frac{8}{3}<\frac{10}{3} .
\end{array}
$$

Therefore, the maximum value in the sequence $\left\{a_{n}\right\}$ is
$$
a_{4}=a_{5}=\frac{10}{3} .
$$
```