# how to prove that $n(n+1)$ can't be square? [duplicate]

Prove: for $n$ is positive integer, it's impossible that: $$\exists k \in \mathbb Z, n(n+1)=k^{2}$$

I know that $(n,n+1)=1$, but the process seems odd using it.

## marked as duplicate by Najib Idrissi, Davide Giraudo, Namaste, Hakim, Rick DeckerJun 9 '14 at 16:48

Suppose for contradiction that there's some non zero $k$ such that $n(n+1)=k^2$

Then $(n-k)(n+k)=-n$

But one of the numbers $n-k$ or $n+k$ has absolute value > $|n|$.

• This answer would be a great addition to the original question. – user26486 Jun 9 '14 at 15:15
• Can’t you just say $n$ and $n + 1$ are even and odd always but squares are always = even $\cdot$ even or odd $\cdot$ odd ?? (This is just proof sketch/idea, I just had to do this for homework and turned it in using my argument here) – Hossien Sahebjame Feb 26 at 22:35

$$n^2 < n(n+1) < (n+1)^2$$

• This is exactly the solution that is shown in the duplicate version; we shouldn't re-answer duplicates. – user26486 Jun 9 '14 at 14:59
• @mathh, this is a basic, very-nice, simple answer which is more or less well-known. It could prefectly well be the poster did not even know there's a duplicate version (you posted 3 minutes after him) and even less that this is the answer there... – DonAntonio Jun 9 '14 at 15:01
• @DonAntonio I never implied that he copied anything, though. – user26486 Jun 9 '14 at 15:06
• Then why the "we shouldn't re-answer duplicates" comment, @mathh ? – DonAntonio Jun 9 '14 at 15:08
• @DonAntonio I meant that the exact same answer is already written and that we should avoid answering duplicates and post solutions in the original question instead. The answerer likely didn't know this is a duplicate, as you claim, though, in which case posting this answer could be reasonable, but we can't ignore the possibility that he knew this is a duplicate but wanted to become more popular and get some reputation by posting the answer instead. But, again, I'm not claiming he knew this is a duplicate. – user26486 Jun 9 '14 at 15:13

Below is a a solution that works much more generally than $\, n^2 < n(n+1) < (n+1)^2.\$ Suppose that $\ n(n\!+\!1) = c^2\,$ in a UFD. Then, since $\,n,\,n\!+\!1\,$ are coprime, as in this proof we deduce that $\, n\!+\!1 = ua^2,\ n = u^{-1} b^2,\,$ for some $\,a,b,\,$ unit $\,u.\,$ So $\, 1 = (n\!+\!1)-n = ua^2\!-u^{-1}b^2,\,$ so scaling by $\,u\,$ yields $\, u = \bar a^2\! -b^2\! = (\bar a-b)(\bar a+b),\,\ \bar a = ua.\,$ Thus $\, \bar a+b = v,\ \bar a-b = v^{-1}\,$ for some unit $\,v,\,$ hence $\, \bar a = (v+v^{-1})/2,\,\ b = (v-v^{-1})/2.\$

In UFDs like $\,\Bbb Z\,$ with finitely many units, there are only finitely many possibilities for the units $\,v,u\,$ hence the proof reduces to checking only finitely many cases.

• But since $n$ and $n+1$ are coprime and make a square when one is multiplied by another, wouldn't it be a better argument to let $n+1=a^2$ and $n=b^2$ without the $u$? – user26486 Jun 9 '14 at 15:56
• How does the $u$ make the argument stronger (if it does) and why does the comprimeness of $n$ and $n+1$ let us deduce that $n+1=ua^2$ and $n=u^{-1}b^2$? Why couldn't we deduce that if they weren't coprime? Couldn't we just let $u$ be an integer such that $u\mid b^2$ in any case? – user26486 Jun 9 '14 at 16:11
• @mathh The unit factor is needed in general UFDs since, e.g. if $\,ab = c^2\,$ then also $\,(au)(bu^{-1}) = c^2.\,$ The linked answer gives a simple proof of the invoked lemma that works in any UFD (and for any power, not just squares). – Bill Dubuque Jun 9 '14 at 16:19
• @Downvoter If something is not clear then please feel welcome to ask questions and I will be happy to elaborate. This is much more to the essence of the matter from a divisibility viewpoint. – Bill Dubuque Jun 9 '14 at 16:56

U can also see it this way n is integer Arithematic mean will be greater than geometric mean So (n + n+1)/2 is greater than equal to [n(n+1)]^1/2 So (n+1/2)^2 is greater than equal to n(n+1) So for any integer n , (n+1/2)^2 cannot be an integer Now u may say that it would the maximum value But u can see for attaining a lesser value u can only decrease n and n is always integer. So it holds true.

• Your inequality is undefined when $n\le -2$. – user26486 Jun 10 '14 at 13:08
• ya true ! but y is it so ?I mean how did u deduce it ? – Gurjot Singh Jun 13 '14 at 2:55
• $\sqrt{n(n+1)}$is undefined when $n\le -2$. If you can't see why, solve the inequality $n(n+1)<0$. A square root of a negative number is undefined in the context of real numbers. And additionally, in general, the AM-GM (as well as all the other power mean inequalities) inequality is for positive numbers (about half of them can include $0$. AM-GM is correct for non-negative numbers; however, the harmonic mean is undefined when one of the numbers is zero). – user26486 Jun 13 '14 at 12:39