The problem: Prove that there exist no positive integers $m$ and $n$ for which $m^2+m+1=n^2$.

This is part of an introductory course to proofs, so at this point, the mathematical machinery should not be too involved. This is supposed to be proven by contradiction. I've been messing around with this for a bit and can't help but feel that I'm missing something completely obvious. My first instinct was to evaluate this case by case based off of combinations of even and odd for m and n, which led to contradictions in the case that both m and n are even or that m is odd and n is even (the contradiction being that zero equates to an odd number). The problem comes when trying to find a contradiction where n is a positive odd number and m is either even or odd.

I then tried to approach it by showing that if $n^2=m^2+m+1$ and n is a positive integer, that $(m^2+m+1)^{\frac{1}{2}}$ must be a positive integer, and that this leads to a contradiction. It certainly looks like this will be the case, since, for the first few positive integer values of m, we get $3^{\frac{1}{2}}$,$7^{\frac{1}{2}}$,$13^{\frac{1}{2}}$,$21^{\frac{1}{2}}$, none of which are positive integers, but at this point at least, I don't know how to demonstrate this with a proof.

A gentle nod in the correct direction would be greatly appreciated. Just starting off with this stuff, so any help/insight would be great.

  • 5
    $\begingroup$ $m^2 < m^2 + m + 1 < m^2 + 2m + 1 = (m+1)^2$. $\endgroup$ Oct 5, 2013 at 13:06

2 Answers 2


Hint: If such $n$ existed, then it would have to be between $m$ and $m+1$ since $$m^2<m^2+m+1<m^2+2m+1=(m+1)^2.$$

  • 1
    $\begingroup$ This is an answer, and not just a hint. :-) I've replaced "such number" with "$n$", to make it a bit more clear. $\endgroup$ Oct 5, 2013 at 13:12
  • $\begingroup$ @VedranŠego: Thanks. It's hard to provide a so-called hint to this question, but it might still require some thought to convince one's self why the implication is true. I'm hoping, anyway, since I called it a hint. :) $\endgroup$
    – Clayton
    Oct 5, 2013 at 13:14
  • $\begingroup$ I see it now. So it's m^2<m^2+m+1=n^2<(m+1)^2, and since m and m+1 are successive positive integers, we must have m<n<m+1, which is impossible. Thanks very much for the help. It is greatly appreciated. $\endgroup$
    – mrmingus
    Oct 5, 2013 at 13:37

Clayton's answer is certainly simpler that this, but here's an alternative.

Multiply both sides by $4$ and you get:

$$(2n)^2 = 4m^2+4m+4 = (2m+1)^2 + 3$$

So $$(2n-(2m+1))(2n+(2m+1)) = 3$$

This means that $3$ can be factored into two numbers that differ by $4m+2$. That means $m=0$ or $m=-1$.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .