Prove that a positive even integer is a difference of two squares if and only if it is divisible by 4.
WLOG, let .
From considerations modulo 2, a and b must both be even, or both be odd.
We can rewrite k = (a + b)(a - b)
Both factors are even.
Thus 4 divides k.
Sorry, forgot about the "if" and only did the "only if." Hmm.
Okay, for the other part, let
It is not hard to show that n must have two factors with an even difference. Just find two factors of k, as in and take .
So we can take the midpoint of the two even factors, which would allow us to write .