# Prove That $n(n+1)$ Can Never Be a Square Number by Showing the Atleast One of Exponents in the Prime Power Decomposition Isn't Even

Can someone show me how to prove that when $n>0$, $n(n+1)$ can never be a square number by demonstrating at least one of the exponents in the prime power decomposition is not even?

Here's what I have done so far:

Without loss of generality I can say $n$ is even and $n+1$ is odd.

The prime power decomposition of $n$ and $n+1$ going from lowest divisor to highest is $n=p^{e_1}_1 p^{e_2}_2 ... p^{e_k}_k$ and $n+1=q^{f_1}_1 q^{f_2}_2 ... q^{f_j}_j$ We know because $n$ is even $2$ must be a divisor of $n$, so $n=2^{e_1} p^{e_2}_2 p^{e_3}_3 ... p^{e_n}_n$

Because $p|m$ or $p|m+1$ but not both, $(\forall i,h \in \mathbb{Z})(p_i \neq q_h)$. This means $\mathrm{gcf}(n,n+1) = 1$ which implies $nx+(n+1)y = 1$ for some integers $x$ and $y$.

As you can see I am very lost, and all help is appreciated.

EDIT: I think I was able to patch together a complete proof from the comments. If both $n$ and $n+1$ are squares then $n+1 = (2a+1)^2$ and $n = (2b)^2$, so $n+1 = 4a^2 + 4a + 1$, which means $n = 4a^2 + 4a = 2^{e_1} p^{e_2}_2 p^{e_3}_3 ... p^{e_n}_n$ which reduces to $a(a+1) = 2^{e_1 -2} p^{e_2}_2 p^{e_3}_3 ... p^{e_n}_n$. Now $a(a+1)$ must be a square. By repeating the process, some product of all the p's that equaled a must be equal to $2^{e_1 -4} p^{e_2}_2 p^{e_3}_3 ... p^{e_n}_n$ which must be a square and so forth. Eventually all the 2's will disappear and a decimal number must be equal to an integer which is impossible.

• all you need is that $n$ and $n+1$ are relatively prime. In order for the product of two coprime numbers to be a square, and both are nonzero positive, then each must be a square. However.... – Will Jagy Jun 27 '16 at 19:37
• Well, when $e_1$ is odd, that certainly takes care of half of your cases... – The Count Jun 27 '16 at 19:41
• Note also that $n+1=2^{e_1} p^{e_2}_2 ... p^{e_k}_k+1$ – The Count Jun 27 '16 at 19:42
• @TheCount I think I was able to patch a proof together from your comments. Does the logic check out? – Stephen Fratamico Jun 27 '16 at 20:39
• @Stephen having a brief glance at it, yes, I think you are good. Consider reading Nathaniel B's answer as well. It is a little terse, but it is very clean and nice. Good work! – The Count Jun 27 '16 at 20:48

Not an answer strictly speaking, but assuming that $n(n+1)$ is a square, it follows that $$4n(n+1) = 4n^2+4n = (2n+1)^2-1$$ is a square, too. However, there are pretty few consecutive squares.
Much easier, don't you think?

• I think I am missing the point of this, but as I read it, I was eager to understand exactly what you're getting at. Care to elaborate? – The Count Jun 27 '16 at 20:49
• @TheCount: Assuming that $n(n+1)$ is a square, there are two consecutive squares: $4n^2+4n$ and $4n^2+4n+1$. However, the only consecutive squares are $0$ and $1$, so $n(n+1)$ is a square only if $n=0$. – Jack D'Aurizio Jun 27 '16 at 20:51
• Wouldn't it be even easier to note that $n^2\lt n(n+1)\lt (n+1)^2$ or $n\lt\sqrt{n(n+1)}\lt n+1$? – bof Jun 27 '16 at 20:53
• Ahhh, there we go. I don't know why that didn't click for me the first time. This is a good observation and a great example of a quick, elegant counterexample, if that's the right word. Thanks for the clarification! – The Count Jun 27 '16 at 20:53

Consider 2 cases: 1) $n$ is a perfect square and 2) $n$ is not a perfect square

1) Assume $n(n+1)$ is a perfect square. No prime factors of $n$ divide $n+1$ and vice versa. Then, if all the exponents in the prime decomposition of $n(n+1)$ are to be even (equivalent to "$n(n+1)$ is a perfect square"), all the exponents in the prime decomposition of $n+1$ must also be even. Thus, both $n$ and $n+1$ are perfect squares. But this is only true when $n=0$ or $1$. Contradiction.

2) No prime factors of $n$ divide $n+1$ and vice versa. Thus, since $n$ is not a perfect square, $n(n+1)$ has at least 1 odd exponent in its prime power decomposition (from $n$) and is therefore not a perfect square.

This proves what we wanted to show.