When(What properties should a number have) can an even number be written as the difference between to perfect squares?
Here's what I've tried:
Let $n$ be that number and let $x^2$ and $(x+y)^2$ be two squares.Then $(x+y)^2 - x^2 = 2xy + y^2$ so we are looking for two positive integers $x$ and $y$ so $n = 2xy + y^2$. $n$ is even so $y$ needs to be even as well so we have $m = xy + y^2/2$ where $2m = n$ but I don't know where to go from here. Thanks in advance!
If $n$ is even and $n=a^2-b^2$ for two integers $a$ and $b$, then, since $n$ is even, $a$ and $b$ are both odd or both even. So, both numbers $a+b$ and $a-b$ are even and therefore, since $n=(a-b)(a+b)$, $4\mid n$.
On the other hand, if $4\mid n$, then$$n=\left(\frac n4+1\right)^2-\left(\frac n4-1\right)^2.$$