4. Given a positive integer $n \geq 3$, if a positive real number $k>1$ satisfies: if positive real numbers $x_{1}, x_{2}, \cdots x_{n}$ satisfy $\sum_{i=1}^{n} x_{i}=k \sum_{i=1}^{n} \frac{1}{x_{i}}$, then it must be true that $\sum_{i=1}^{n} \frac{x_{i}^{2}}{x_{i}^{2}+1} \leq k \sum_{i=1}^{n} \frac{1}{x_{i}^{2}+1}$, then it is called a "good number". Try to find the smallest good number $k$.