8. Given that $a, b, c$ are the lengths of the 3 sides of a right triangle, and for a natural number $n$ greater than 2, $\left(a^{n} + b^{n} + c^{n}\right)^{2} = 2\left(a^{2 n} + b^{2 n} + c^{2 n}\right)$ holds, then $n=$ $\qquad$ .
8.4

Let $x=a^{\frac{n}{2}}, y=b^{\frac{n}{2}}, z=c^{\frac{\pi}{2}}$, then
$$
\begin{aligned}
0 & =2\left(a^{2 n}+b^{2 n}+c^{2 \pi}\right)-\left(a^{n}+b^{n}+c^{n}\right)^{2}-2\left(x^{4}+y^{4}+z^{4}\right)-\left(x^{2}+y^{2}+z^{2}\right)^{2} \\
& =x^{4}+y^{4}+z^{4}-2 x^{2} y^{2}-2 x^{2} z^{2}-2 y^{2} z^{2} \\
& =-(x+y+z)(x+y-z)(y+z-x)(z+x-y)
\end{aligned}
$$

Assume $c$ is the hypotenuse, then $z>x, z>y$. We know
$$
\begin{array}{l}
x+y+z>0, y+z-x>0, z+x-y>0 . z=x+y \\
\text { i.e. }\left(\frac{a}{c}\right)^{\frac{n}{2}}+\left(\frac{b}{c}\right)^{\frac{\pi}{2}}=1 .
\end{array}
$$

On the other hand, $a^{2}+b^{2}=c^{2}$ holds, i.e. $\left(\frac{a}{c}\right)^{2}+\left(\frac{b}{c}\right)^{2}=1$.
Since $0<\frac{a}{c}<1,0<\frac{b}{c}<1, y=\left(\frac{a}{c}\right)^{x}+\left(\frac{b}{c}\right)^{x}$ is a monotonically decreasing function, and $y=1$ is only taken at one point $x$.
Therefore, $\frac{n}{2}=2, n=4$.