For which integers $n$ are there solutions to the equation $x^2-y^2=n$ 
For which integers $n$ are there solutions to the equation $x^2-y^2=n$

I believe $n$ must be divisible by $3$, since for any integers $x,y$ mod $3$. $x^2=3k+1$ and $y^2=3n+1$, thus $x^2-y^2=3(n-r)$.
Then I would have $n=0$ with $x,y=0$.
I also found that $n$ if it is even must be divisible by a power of $2$ greater then $1$. Since if $n$ is even then one of $(x+y),(x-y)$ is even, so both are even. Then $4\mid n$.
I'm not sure if there are more restrictions, or how to determine if there are no more. Assuming these are done correctly.

As $x+y+x-y=2x,$ 
$x+y,x-y$ have the same parity
If both are odd, $(x+y)(x-y)=n$
we can choose $x+y=n, x-y=1$
If both are even $4|n,n=4m$ $$\dfrac{x+y}2=m,\dfrac{x-y}2=1$$
