Proving expressibility of integers as the difference of two squares.

1k Views Asked by At

I'm given the task:

Prove that a positive integer is expressible as the difference of two squares of integers if and only if it is not of the form $4n+2, n\in\mathbb{Z}$

I was given a hint that I can just explicitly express $4n$, $4n+1$, and $4n+3$ as the difference of two squares to prove the $\rightarrow$ direction.

Probably a trivial question but how do I go about representing an integer of the form $k = 4n+1$ for $k, n \in \mathbb{Z}$ as the difference of two squares?

And why does this procedure satisfy the 'if'-portion of the proof?

2

There are 2 best solutions below

0
On BEST ANSWER

Hint The difference of $(m + 1)^2$ and $m^2$ is $2 m + 1$.

The $\Leftarrow$ (if) direction just asserts that if an integer does not have the form $4 n + 2$ then it is expressible as a difference of squares. But any integer has the form $4 n$, $4 n + 1$, $4 n + 2$, or $4 n + 3$ for some $n$, so this direction is equivalent to showing that general integers of each of the other three forms is expressible as such a difference.

0
On

$(m+1)^2-m^2=2m+1$, so this covers $4n+1, 4n+3$.

$(m+2)^2-m^2=4(m+1)$, so this covers all numbers of the form $4n$.

$4n+2$ is impossible as $m^2$ is either $0$ or $1$ mod $4$, so we can only have $0-0, 1-0, 0-1, 1-1 (\equiv 0, 1, -1, 0) \mod 4$.