5. Let $n (n>1)$ be a given integer. Find the largest constant $\lambda(n)$, such that for any $n$ non-zero complex numbers $z_{1}, z_{2}, \cdots, z_{n}$, we have
$$
\sum_{k=1}^{n}\left|z_{k}\right|^{2} \geqslant \lambda(n) \min _{1 \leqslant k \leqslant n}\left\{\left|z_{k+1}-z_{k}\right|^{2}\right\}\left(z_{n+1}=z_{1}\right) \text {. }
$$
(Supplied by Gangsong Leng)
```
\begin{array}{l}
\text { 5. Let } \quad \lambda_{0}(n)=\left\{\begin{array}{ll}
\frac{n}{4}, & \text { when } n \text { is even; } \\
\frac{n}{4 \cos ^{2} \frac{\pi}{2 n}}, & \text { when } n \text { is odd. }
\end{array}\right. \\
\text { Next, we prove: } \lambda_{0}(n) \text { is the desired maximum constant value, } \\
\text { If there exists a positive integer } k(1 \leqslant k \leqslant n) \text { such that } \\
\left|z_{k+1}-z_{k}\right|=0 \text {, } \\
\text { then the original inequality obviously holds. } \\
\text { In the following, we assume without loss of generality that } \\
\min _{1 \leq i \leq n}\left\{\left|z_{k+1}-z_{k}\right|^{2}\right\}=1 \text {. } \\
\text { Under this condition, we only need to prove: } \sum_{k=1}^{n}\left|z_{k}\right|^{2} \text { has a minimum value of } \\
\lambda_{0}(n) \text {. } \\
\text { When } n \text { is even, since } \\
\sum_{k=1}^{n}\left|z_{k}\right|^{2}=\frac{1}{2} \sum_{k=1}^{n}\left(\left|z_{k}\right|^{2}+\left|z_{k+1}\right|^{2}\right) \\
\geqslant \frac{1}{4} \sum_{k=1}^{n}\left|z_{k+1}-z_{k}\right|^{2} \\
\geqslant \frac{n}{4} \min _{1<1<n}\left\{\left|z_{k+1}-z_{k}\right|^{2}\right\}=\frac{n}{4}, \\
\text { when }\left(z_{1}, z_{2}, \cdots, z_{n}\right)=\left(\frac{1}{2},-\frac{1}{2}, \cdots, \frac{1}{2},-\frac{1}{2}\right) \text {, the equality holds. } \\
\text { Therefore, the minimum value of } \sum_{k=1}^{n}\left|z_{k}\right|^{2} \text { is } \frac{n}{4}=\lambda_{0}(n) \text {. } \\
\text { When } n \text { is odd, let } \\
\theta_{k}=\operatorname{arg}\frac{z_{k+1}}{z_{k}}\in[0,2\pi)(k=1,2,\cdots,n). \\
\text { For each } k, \text { by equation (1) we get } \\
\text { if } \theta_{k} \in \left(\frac{\pi}{2}, \frac{3\pi}{2}\right), \text { then by } \cos \theta_{k} < 0 \text { and equation (1), we have } \\
|z_{k}|^{2} + |z_{k+1}|^{2} \geqslant \frac{1}{2 \sin^{2} \frac{\theta_{k}}{2}} \text { (3) } \\
\text { Consider two cases: } \\
\text { By equation (3), we get } \\
\text { (4) } \\
\text { where } m \text { is some positive integer, and } m < n. \\
\text { Note that } n \text { is odd. } \\
\text { Let } f(x) = \frac{1}{\sin^{2} x} (x \in [\frac{\pi}{4}, \frac{3\pi}{4}]) \text {, it is easy to see that } f(x) \text { is a convex function. } \\
\text { By equation (4) and Jensen's inequality, combined with equations (5) and (6), we get } \\
\frac{n}{4} \cdot \frac{1}{\sin^{2} \left(\frac{1}{n} \sum_{i=1}^{n} \frac{\theta_{k}}{2}\right)} = \frac{n}{4} \cdot \frac{1}{\sin^{2} m\pi} \text { (7) } \\
\text { (2) If there exists } (1 \leqslant j \leqslant n) \text { such that } \theta_{j} \notin \left(\frac{\pi}{2}, \frac{3\pi}{2}\right). \\
\text { Let } I = \{ j \} \\
\text { By equation (2), for } j \in I, \text { we have } \\
|z_{j}|^{2} + |z_{j+1}|^{2} \geqslant 1; \\
= \frac{1}{2} |I| + \frac{1}{4} (n - |I|) = \frac{1}{4} (n + |I|) \\
\text { Note that, } \\
\cos \frac{\pi}{2n} \geqslant \frac{n}{n+1} \\
\text { if and only if } \\
\sin \frac{\pi}{2n} \leqslant 1 - \frac{n}{n+1} = \frac{1}{n+1} \\
\text { When } n = 3, \text { equation (8) holds. } \\
\text { When } n \geqslant 5, \\
\sin \frac{\pi}{2n} < \left(\frac{\pi}{2n}\right)^2 < \frac{\pi^2}{2n} \cdot \frac{1}{n+1} < \frac{1}{n+1} \\
\text { Hence, equation (8) also holds. } \\
\text { Therefore, for all odd } n \geqslant 3, \text { we have } \\
\text { Combining equation (7), we get } \\
\text { On the other hand, when } \\
z \\
\text { In summary, } \lambda_{0}(n) \text { is the maximum value of } \\
\lambda_{0}(n) = \left\{\begin{array}{ll}
\frac{n}{4}, & \text { when } n \text { is even; } \\
\frac{n}{4 \cos^{2} \frac{\pi}{2n}}, & \text { when } n \text { is odd. }
\end{array}\right.
```