Problem: Show that for any integer $n$, there will always exist integers $x,y$ such that $n^3 = x^2-y^2$
My attempt: If $n^3 = x^2-y^2$, then $x = y \mod(n)$, and at the same time $x = -y \mod(n)$, So that $2x = 0 \mod(n)$. I could then split the problem into two cases: If $2^{-1}$ exists, then $x=kn$ for some integer $k$, and so the equation reduces to: $n^2(n-k^2)=-y^2$, so that $n<k^2$. This is about how far I have gotten, not sure how to proceed. Hints appreciated.
If $2^{-1}$ does not exist...
Edit: I made a mistake above, but now that the answer is given I will just leave it up for now.
Factor $x^2-y^2=(x-y)(x+y)$. Particularly in contest math that should be your first thought on seeing a difference of squares.
If $n$ is odd, so is $n^3$ and you can write $n^3=2k+1$. Then $x=k+1, y=k$ works based on $2k+1=1\cdot (2k+1)$.
If $n$ is even you can write $n^3=8k$, note $8k=2\cdot (4k)$ and solve $x-y=2,x+y=4k$ to get $x=2k+1,y=2k-1$
This approach does not depend on the fact we are trying to express is a cube. The first works for all odd numbers, the second for all multiples of $4$. There is no solution for a number of the form $4k+2$