Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question
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$

share|cite|improve this answer
Nice, Babak...+ – amWhy May 23 '13 at 0:17


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


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$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.