Can $n(n+x)$ with $x \leq n$ form a perfect square?

77 Views Asked by At

So I was doing some theoretical computer science and am wondering if

$n(n+x) = n^2 + nx$ with $x \leq n$ and $n,x \in \mathbb{N}$ form a perfect square?

I thought about it for about 2 days already and just can't come up with a proof that it can't nor did I find an example with relatively small numbers.

4

There are 4 best solutions below

1
On

Yes it can.

$$9\times(9+7)=9\times16=144=12^2.$$

0
On

We have $$12100=110^2=100(100+21)$$

My thoughts as I came up with this: what you want is a number that is both a square number $m^2$, but at the same time can be written as a product of two factors $n$ and $n+x$ that are unequal, but not too far apart in value.

With that in mind, I thought $(10\cdot11)^2$ would be a nice number because it's also $10^2\cdot 11^2$, where $10^2$ and $11^2$ aren't too far away.

The same technique gives several examples, the smallest of which is $3^2\cdot4^2=12^2=9(9+7)$. Generalised, we have the following: take two numbers $n,m$ such that $n^2<m^2<2n^2$, and we have $$(nm)^2=n^2(n^2+(m^2-n^2))$$

0
On

Yet another example...

$$576=24^2=18(18+14)$$

This follows for all multiples of Weijun Zhou's Answer(+1).

0
On

Notice that if you can write $n^{2} + nx = n^{2} + 2na + a^{2}$ for some $a$, then $n^{2}+nx = (n+a)^{2}$ is a perfect square. So you want to have $nx = 2na + a^{2}$ for some $a$.

Choose $n$ and $a$ with $n \mid a^{2}$, then put $x = \frac{2na + a^{2}}{n}$.

This gives you lots of choices, if you are requiring that $x \leq n$ then set up an equation to have $$\frac{2na+a^{2}}{n} \leq n,$$ this will give you a quadratic and you can see that it will hold when $n \geq a(1+\sqrt{2})$ (equivalently, $0 <a \leq n(\sqrt{2}-1)$).

The smallest example is obtained by taking $a = 3$, $n = 9$. This gives Weijun Zhou's answer with $x = 7$, and $$9(9+7) = 12^{2}.$$