# squares of integers, and multiples of 4

Prove that for all $n\in\Bbb Z$ there exists $k\in\Bbb Z$ such that either $n^2=4k$ for $n^2 = 4k + 1$.

A hint given was: What are the possible remainders for n after dividing by 4? Break into the cases where you have each remainder.

-
Can you answer the question in the hint? – Brian M. Scott May 22 '13 at 7:03
I think the answer to the title of this problem is yes. – Tunococ May 22 '13 at 7:11
@Tunococ, sorry, I edited the title so your comment no longer applies. – Gerry Myerson May 24 '13 at 12:20

Try to consider two different cases:

• If $n=2k$ when $n$ is even, so $n=4k^2=4k', k,k'\in\mathbb Z$

• If $n=2k+1$ when $n$ is odd, so $n^2=4k'+1, k'\in\mathbb Z$

-
Nice, Babak...+ – amWhy May 23 '13 at 0:17

Hint:

$k \equiv \pm 1$ or $2(\mod 4) \implies k^2 \equiv 1$ or $0(\mod 4)$

Proof:

When $k \in \text{odd}$, $k=2n+1 \implies k^2=4n^2+4n+1 =4n(n+1)+1$

When $k \in \text{even}, k=2n \implies k^2=4n^2$

-