Originally Posted by

**Zalren** Find all positive integers which can be written as the difference of squares.

This is what I have so far: Let $\displaystyle n$ be a positive integer such that $\displaystyle n = x^2 - y^2 = (x+y)(x-y)$. Also I believe I am safe in assuming that $\displaystyle x, y \geq 0$ because the squares of the negatives are the same as the squares of the positives, and $\displaystyle x > y$ because if $\displaystyle x \leq y$ then $\displaystyle n$ is not a positive integer.

We have two cases.

Case 1) $\displaystyle n$ is even.

$\displaystyle n = (x+y)(x-y)$ so either $\displaystyle (x+y)$ or $\displaystyle (x-y)$ is even.

If $\displaystyle (x-y)$ is even, then $\displaystyle (x-y)=2k$, for some $\displaystyle k\geq 1$. So $\displaystyle x=2k+y$

Then $\displaystyle (x+y)=(2k+y)+y=2k+2y=2(k+y)$.

So if $\displaystyle (x-y)$ is even then $\displaystyle (x+y)$ is also even. So $\displaystyle (x+y)$ is even no matter if $\displaystyle (x-y)$ is even or not. Satisfying that $\displaystyle n$ is even.

the above said statement is correct but a concise and precise statement would be $\displaystyle 2|(x-y) \iff 2|(x+y)$.

$\displaystyle n=(x+y)(x-y)=2(k+y)(2k)=4k(k+y)$ thus $\displaystyle n$ must be divisible by 4 if $\displaystyle n$ is even

Case 2) $\displaystyle n$ is odd.

This is where I am weak, I think.

$\displaystyle n = (x+y)(x-y)=2k+1$ for some $\displaystyle k\geq 1$. This implies $\displaystyle n\geq 3$.

$\displaystyle n\geq 3$ if $\displaystyle n$ is odd.

So I think I can conclude that all the positive integers that can be written as the difference of squares is divisible by 4, if even, and greater than 3, if odd.

Any help correcting and/or cleaning up what I have would be appreciated.