In order to solve some bigger problem I need to prove that equation
$$z^2+y^2=nx^2$$ where $ n=6 \; mod\;8$ and $x,y,z$ are all integers, doesn't have any non-zero solutions
I was given a hint how to do it when $n=6$. Say we have
$$z^2+y^2=6x^2$$ Then we can consider that $gcd(x,y,z)=1$. Then $z^2+y^2$ is divisible by 3. It can only be if both $z^2$ and $y^2$ are divisible by 3, hence $z$ and $y$ are divisible by 3. Hence $6x^2$ has to be divisible by 9, it can only be if $x$ is divisible by 3 and we have a contradiction because $gcd(x,y,z)=3.$
I can do that trick when $n=14$ and I guess with other $n$. But I can't get the general principle. If you have any ideas. please share.