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

How do I answer this?

Prove that it is impossible to find any integer $n$ such that $n^2 \equiv 2 \pmod 4$ or $n^2 \equiv 3 \pmod 4$. Hence or otherwise, prove that there do not exist integers $m$ and $n$ such that $3m^2 - 1 = n^2$.

I'm still stuck :(

Regarding to "what is n^2 congruent to each of the 0,1,2,3 cases, is it just 0,1,4,9? What do I do next?

share|cite|improve this question
Is this homework? What have you tried? – Bruno Joyal May 10 '12 at 18:38

It is also impossible to find any integer $n$ such that $$ n^2 \equiv 2 \pmod 3. $$

EDITTTTT: Note that if you have a positive prime $p \equiv 1 \pmod 4,$ then there is always an integer solution to $$ x^2 - p y^2 = -1.$$ Proof in Mordell's book. For prime coefficients there is thus no ambiguity, as for positive prime $q \equiv 3 \pmod 4,$ there is never an integer solution to $$ x^2 - q y^2 = -1.$$

It starts to get tricky with composite coefficients. There is no integer solution to $x^2 - 34 y^2 = -1.$ There is no integer solution to $x^2 - 205 y^2 = -1.$ Here 205 is the smallest odd number that gives a surprise. And, when I say surprise, note that there is never a solution to $x^2 - k^2 y^2 = -1$ when $k >1.$

share|cite|improve this answer


  1. An integer $n$ must be congruent to one of $0,1,2$, and $3$ mod $4$. To what is $n^2$ congruent in each of these cases?

  2. After you've proved the first statement, you know that $n^2$ must be congruent to $0$ or $1$ mod $4$, so $n^2+1$ must be congruent to $1$ or $2$ mod $4$, and of course $3\equiv -1\pmod 4$. What can you deduce from this about $m^2$ mod $4$?

share|cite|improve this answer

Hint $\rm\: mod\ 4\!:\ even^2\equiv 0,\ odd^2\equiv 1\:\Rightarrow\ n^2\! + m^2\not\equiv 3,\ $ i.e. $\rm\ n^2\! - 3\:\!m^2\not\equiv -1\ $

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.