5. Let the function $y=f(x)=\frac{x^{2}-x+n}{x^{2}+x+1}(x \in R$ and $\left.x \neq \frac{n-1}{2}, n \in N\right)$ have the minimum value $\Omega_{n}$, the maximum value $b_{n}$, and let $c_{n}=\left(1-a_{n}\right)\left(1-b_{n}\right)$. Then the sequence $\left\{c_{n}\right\}$ ).
(A) is an arithmetic sequence with a non-zero common difference
(B) is a geometric sequence with a common ratio not equal to 1
(C) is a constant sequence
(D) is neither an arithmetic sequence nor a geometric sequence
5. (C).

From $y=\frac{x^{2}-x+n}{x^{2}+x+1}$, we get
$$
\begin{array}{l}
(y-1) x^{2}+(y+1) x+(y-n)=0 . \\
\because x \neq \frac{n-1}{2}, \therefore y \neq 1 .
\end{array}
$$
$\because$ Equation (1) has real roots,
$$
\therefore \Delta=(y+1)^{2}-4(y-1)(y-n) \geqslant 0 \text {, }
$$

which means $3 y^{2}-(4 n+6) y+(4 n-1) \leqslant 0$.
According to the problem, $a_{n}$ and $b_{n}$ are the two roots of the equation $3 y^{2}$
6) $y+(4 n-1)=0$. Therefore,
$$
\begin{array}{l}
a_{n}+b_{n}=\frac{4 n+6}{3}, a_{n} b_{n}=\frac{4 n-1}{3} . \\
\begin{aligned}
\therefore c_{n} & =1-\left(a_{n}+b_{n}\right)+a_{n} b_{n} \\
& =1-\frac{4 n+6}{3}+\frac{4 n-1}{3}=-\frac{4}{3} .
\end{aligned}
\end{array}
$$

Thus, $\left\{c_{n}\right\}$ is a constant sequence.