Show that the equation $x^3+2y^2+4z=n$ has an integer solution $(x,y,z)$ for all integers $n.$ 
Show that the equation $$x^3+2y^2+4z=n$$ has an integer solution $(x,y,z)$ for all integers $n.$

I tried to use parity in order to get somewhere, but couldn't get quite far.
I was given a hint that I should first show that $n$ can be of some of the following forms $n=4k, n=4k+1, n=4k+2, n=4k+3$. How can I come to this conclusion?
 A: 
I was given a hint that I should first show that n can be of some of the following forms n=4k,n=4k+1,n=4k+2,n=4k+3. How can I come to this conclusion?

If you take an integer $n$ and divide it by $4$ you will get a quotient $k$ and a remainder $r$.  And you can say $n = 4k + r$ and that $r = 0,1,2,$ or $3$.
That is how you come to that conclusion.
Now, if we let $z = k$ then we have $x^3 + 2y^2 + 4z = x^3+2y^2+4k = n = 4k +r$ so
$x^3 + 2y^2 = r$ so if we can find integer solutions to $x^3 +2y^2 = 0,1,2,3$ we will be done.
Now $0^3 + 2*0^2 = 0$ is clearly a solution for $r = 0$.  So $(0,0,k)$ is a solution to $x^3 + 2y^2 + 4z = n = 4k$.
And $1^3 + 2*0^2=1$ is a solution for $r=1$.  So $(1,0,k)$ is a solution to $x^3 + 2y^2 + 4z = n = 4k+1$.
And $0^3 + 2*1^2 = 2$ is a solution for $r=2$.  So $(0,1,k)$ is a solution to $x^3 + 2y^2 + 4z = n = 4k +2$.
And $1^3 + 2*1^2 =3$ (I'm embarrassed to say that that it took me a long time to come up with that as my instinct so to use $x=-1$ and $z =k+1$ or other variations first) is a solution for $r=3$ and so $(1,1,k)$ is a solution for $x^3 + 2y^2 + 4z = n = 4k+3$.
.....
Now obviously these aren't the only solutions.  (if $(x,y,z)= (3,2,1)$ then $x^3 + 2y^2 + 4z= 27+8 + 4= 39$ is a solution for $n=39$..... but so is $(1,1,9)$ as $39=4*9+3$).  But they are enough to show solutions always exist.
A: Take $(x,y)=(0,0),(1,0),(0,2),(1,1)$ respectively to account for the cases of $n$ being $4k,4k+1,4k+2,4k+3$
