4. Let $f(x)=\frac{x^{4}+k x^{2}+1}{x^{4}+x^{2}+1}(x \in R)$, for any three real numbers $a, b, c$, it is known that there exists a triangle with side lengths $f(a), f(b), f(c)$, then all real numbers $k$ that satisfy the above condition are $\qquad$ .
4. $\left(-\frac{1}{2}, 4\right)$.

From $\frac{x^{2}}{x^{4}+x^{2}+1} \leqslant \frac{1}{3}$, then
$$
f(x)=1+\frac{(k-1) x^{2}}{x^{4}+x^{2}+1} \text {. }
$$

If $k \geqslant 1$, then $1 \leqslant f(x) \leqslant \frac{1}{3}(k+2)$;
If $k \leqslant 1, \frac{1}{3}(k+2) \leqslant f(x) \leqslant 1$.
According to the problem, $\forall x \in R$, we have
$2 \min f(x)>\max f(x)$.
When $k \geqslant 1$, $2>\frac{1}{3}(k+2), 1 \leqslant k \leqslant 4$; when $k$ $\leqslant 1$, $\frac{2}{3}(k+2)>1,-\frac{1}{2}<k \leqslant 1$. Therefore, all $k$ is $\left(-\frac{1}{2}, 4\right)$. Readers can verify that any real number $k$ in $\left(-\frac{1}{2}, 4\right)$ satisfies the problem.