Prove that every odd prime number can be written as a difference of two squares.

$1$. Let $(x+y)(x-y) = p$

Since $p$ is prime, the smaller divisor has to be one, ie. $(x-y) = 1$, giving $2y+1 = p \implies y = \frac{p-1}{2}$ (you're guaranteed y is an integer because $p$ is an odd number).

So the only possible solution set is $x = \frac{p+1}{2}, y = \frac{p-1}{2}$

$2$. Uniqueness already established via reasoning above.

$3$. Possible, but it will be non-unique as $(x-y)$ can take on multiple values, e.g. $1$ or a single prime divisor of $p$ or a product of some (but not all) prime divisors of $p$.

$4$. No, because again $(x-y)$ = 1 is forced. But now you get $x = \frac{3}{2}$ which is non-integral. So no integer solution sets exist.


Hint. If $p$ is prime and $p\ne2$, can you solve $$p=(x+y)(x-y)\ ?$$ Is there more than one solution?