# Math Help - Difference of two squares

1. ## Difference of two squares

Prove that a positive even integer is a difference of two squares if and only if it is divisible by 4.

2. Originally Posted by tarheelborn
Prove that a positive even integer is a difference of two squares if and only if it is divisible by 4.
WLOG, let $a > b \geq 0, k = a^2 - b^2, k \text{ even}$.

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 $n=4k > 0$

It is not hard to show that n must have two factors with an even difference. Just find two factors of k, as in $k=cd$ and take $n=(2c)(2d)$.

So we can take the midpoint of the two even factors, which would allow us to write $n=(a+b)(a-b)$.