Solution:
It is easy to check that (±2r,0,2r) and (0,±2r,2r+1) satisfy this equation for any nonnegative integer r. We will show that these are all the solutions by an infinite descent method.
So suppose we have some solution (x0,y0,n0). If x0 is odd, then 2n0 is odd, which forces n0=0 and then x02+2y02=1, so y0=0 (or else 2y02>1 already) and then x0=±1.
On the other hand, if x0 is even, we can let x0=2x0′ and then 4x0′2+2y02=2n0⇒y02+2x0′2=2n0−1, so (x1,y1,n1)=(y0,x0/2,n0−1) is another solution to our equation, where n0 has been replaced by n0−1. Now if x1 is even, we can repeat this construction to get another new solution (x2,y2,n2) with n0−1 replaced by n0−2, and so on. These integers n cannot go on decreasing forever, since there does not exist an integral solution where n<0. Thus, eventually our process terminates, which means we get to a solution (xk,yk,nk) with xk odd. By the above, this is possible only if xk=±1,yk=0,nk=0.
On the other hand, the above construction can be performed in reverse: we have xi=2yi+1,yi=xi+1,ni=ni+1+1 for each value of i≥0. Now we claim that (xi,yi,ni)=(±2(k−i)/2,0,k−i) when k−i is even, and (0,±2(k−i−1)/2,k−i) when k−i is odd. The proof is by downward induction: the base case i=k is certainly true; given that the statement holds for some i>0, it is simple algebra to check that it holds for i−1 by applying our reverse construction. Thus, the claim is true for each i≥0. In particular, (x0,y0,n0)=(±2k/2,0,k) or (0,±2(k−1)/2,k), which fits the form above. So, every solution is of this form.