I need to show that if $4 | x^2+y^2+z^2$ then $x, y, z$ are all even. I have absolutely no idea how to solve this question.
The second question I have is:
If $k,s \in \mathbb N$ then the equation $x^2+y^2+z^2 = 4^{s-1}(8k-1)$ does not have any integer solution.
My attempt: From the first question I can say that if $(x, y, z)$ is a solution then $x, y, z$ are even (because $s>1$, I can prove that there is no solution for $s=1$). but I don't know how to continue. I need any kind of help you can give.
Thank in advance
We know that each square is of the form $4n$ or $4n+1$. (The proof to this will be in a comment.) Use contradiction.
Say that there is at least one odd square, in the form $4k+1$. Then, no matter whether the second and third numbers are even or odd, the sum of squares will not be divisible by $4$. If we already assign a $4k+1$, then we need to add $3$ to get it to be divisible by $4$. But of course, no pair of $0$s or $1$s (the constant terms from $4n+\boxed{0}$ and $4n+\boxed{1}$) will add to $3$.
Therefore, all three squares must be even, and using this, I think you can solve the second problem.
Hint for second problem: If $s \ne 1$, then $x^2+y^2+z^2$ must be divisible by $4$, which we proved is impossible. Now you just have to prove for $s = 1$.