Find all quadruplets of positive integers $(x, y, z, n)$ such that: $x^{2}+y^{2}+z^{2}+1=2^{n}$
We look modulo 8. For $n<3$ the only solutions are:

$$
(0,0,0,0),(0,0,1,1),(0,1,0,1),(1,0,0,1),(1,1,1,2)
$$

If $n \geqslant 3$, we look modulo 8. A square is congruent to $0,1,4$ modulo 8, so the right-hand side is $1,2,3,4,5,6$ or 7, but never 0 modulo 8. Thus, there are only the 5 solutions mentioned previously.