[Math] Prove that there exist no positive integers $m$ and $n$ for which $m^2+m+1=n^2$

elementary-number-theoryproof-writing

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.

Best Answer

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.$$