Multiples of 4 as sum or difference of 2 squares

It is true because

$$ (n+1)^2 - (n-1)^2 = 4n $$


Here is a hint: the form $x^2-y^2$ factors as $(x+y)(x-y)$. Therefore, if you want to represent an integer $N$ as $x^2-y^2$, you can attempt to do so by choosing a factorization $N = ab$ and solving the linear system

$x+y = a$
$x-y = b$.

This system has the unique rational solution $x = \frac{a+b}{2}$, $y = \frac{a-b}{2}$. This gives an integral solution iff $a$ and $b$ have the same parity. Use this to show:

A positive integer $N$ is of the form $x^2 - y^2$ for $x,y \in \mathbb{Z}$ (possibly $0$) iff $N$ is odd or $N$ is divisible by $4$.

In particular, $4n$ is always of the form $x^2-y^2$. You want a little more: that $x$ and $y$ are both nonzero. Clearly $x$ cannot be zero, so you need to analyze the case $y = 0$ and show that whenever all possible solutions to $n = x^2 - y^2$ have $y = 0$, then there are nonzero $X$ and $Y$ such that $4n = X^2 + Y^2$. This is not so hard...