Can $n^2+4n$ be a perfect square?

Do there exist positive integers $n,k$ such that $n^2+4n=k^2$? I'm not sure how to attack this question. I was able to get that $n=\frac{-4\pm\sqrt{16+4k^2}}{2}$, but I don't think it is of any use.

• Suppose you had such $n$ and $k$. Evidently $k > n$. So write $k = n + a$. What would $a$ be? – Daniel Fischer Jun 22 '15 at 22:40

Clearly the number is greater then $n^2$, so the smallest square it could be is $(n+1)^2 = n^2 + 2n + 1 \neq n^2 + 4n$ because $2n +1\neq 4n$ for $n \in \mathbb N$.

The next square is $(n+2)^2 = n^2 + 4n + 4$ which is bigger than our number.

So in conclusion no, $n^2 + 4n$ is never a perfect square

HINT: Recall that

$$(n+2)^2=n^2+4n+4$$

• By far the simplest answer. – user3932000 Jun 23 '15 at 1:59

We have

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

So if $n^2+4n$ is a square, we must have that $n^2+4n=(n+1)^2$. But this quickly leads to the equation $2n=1$, which is impossible.

Note first that there are no integers between any other two integers.

Now note that $n^2+4n+4 = (n+2)^2$ meaning $n^2+4n = (n+2)^2-4$.

For large enough $n$ this can be bounded between two consecutive squares so you just have to prove these bounds and demonstrate for small $n$ the specified relation holds.

Assume $n^2+4n = k^2 \Rightarrow n(n+4) = k^2$. There are $2$ cases:

Case 1: $n = m^2, n+4=p^2$ whereas $mp = k \Rightarrow 4 = p^2-m^2 = (p-m)(p+m)$, and you can take it from here

Case 2: $n = a, n+4 = ap^2$ whereas $ap = k \Rightarrow 4 = a(p^2-1) = a(p-1)(p+1)$, and you can also take it from here.

For a number to be a square for any prime divisor $p$ of that number, $p^2$ should also divide it.

Now write $n^2+4n$ as $n(n+4)$; except $2$ no other prime number can divide both $n$ and $n+4$. So if $n$ is not a square, $n^2+4$ cannot be. But if $n$ is a square $n+4$ should also be a square for $n^2+4n$ to be a square. Among positive integers there are exist no two square differing by 4.

• "except $2$ no prime number divides both $n$ and $n+4$" Prove that $n$ is even before you claim this. – user26486 Jun 22 '15 at 23:53
• user264866: You are right. I am correcting it. Thanks for pointing out the error. – P Vanchinathan Jun 23 '15 at 6:01