6. If a sequence of numbers $a_{1}, a_{2}, \cdots$ satisfies for any positive integer $n$ that
$$
a_{n}=\frac{n^{2}+n-2-\sqrt{2}}{n^{2}-2},
$$

then the value of $a_{1} a_{2} \cdots a_{2016}$ is
$$
=, 6.2016 \sqrt{2}-2015
$$

From the problem, we know
$$
\begin{array}{l}
a_{n}=\frac{n^{2}+n-2-\sqrt{2}}{n^{2}-2}=\frac{(n+1+\sqrt{2})(n-\sqrt{2})}{(n+\sqrt{2})(n-\sqrt{2})} \\
=\frac{n+1+\sqrt{2}}{n+\sqrt{2}} .
\end{array}
$$

Therefore, $a_{1} a_{2} \cdots a_{2016}$
$$
\begin{array}{l}
=\frac{2+\sqrt{2}}{1+\sqrt{2}} \cdot \frac{3+\sqrt{2}}{2+\sqrt{2}} \cdots \cdots \frac{2017+\sqrt{2}}{2016+\sqrt{2}} \\
=\frac{2017+\sqrt{2}}{1+\sqrt{2}}=2016 \sqrt{2}-2015 .
\end{array}
$$