Which values for $x$ make $x(x + 180)$ a square?

Which values for $x$ make $x(x + 180)$ a square?

$x = 12, 16, 60$ are some values. Then maybe solving $x(x + 180) = y^2$ would give other values? Tried using the general formula, but that would only give 2 values each time I find a suitable $y$, not all values. And I am stuck in the process:

$x(x + 180) = y^2 \Rightarrow x^2 + 180x - y^2 = 0.$

$x = \frac{-180 \pm \sqrt{180^2 +4y^2}}{2} = \frac{-180 \pm \sqrt{8100 +y^2}}{2}$ And then I beleive that I should find a sum of squares that is a square, and that gives a positive $x.$

• Are you looking for all positive integers $x$ such that $x(x+180)$ is a square? – Gibbs Jun 4 '18 at 20:02
• When $8100+y^2$ is a square, $x$ is an integer. – Kolja Jun 4 '18 at 20:02
• There's an error in the last line --> $\frac{-180\pm \sqrt{180^2+4y^2}}{2}=-90 \pm \sqrt{8100+y^2}$. Note also that there's only a finite number of integer valued $y$ making $8100 +y^2$ a square. – Kolja Jun 4 '18 at 20:34

Note that $$y^2=x(x+180)=(x+90-90)(x+90+90)=(x+90)^2-90^2$$ and then $$90^2=(x+90)^2-y^2=(x+90+y)(x+90-y)$$ As the factors on th right have the same parity (differ by $2y$) and the left is even, we are looking for factorizations of $90^2$ into even factors. Any such factorization $90^2=(2u)(2v)$ (or simply $45^2=uv$) with wlog $u\ge v$ leads to valid solution $y=u-v$ and $x=u+v-90$. (Don't forget to allow negative $u,v$)

Hint:

Use if quadratic equation with integer coefficients has integer root, then it's discriminant must be a perfect square. So

$$8100 +y^2 = z^2$$ for some nonnegative integer $z$.

So you need to find $y$ so that $180^2 + 4y^2$ is a perfect square

Or $90^2 + y^2=k^2$ is a perfect square.

That means $90^2 = k^2 - y^2 = (k-y)(k+y)$ and that we can solve be factoring $90^2 = 2^2*3^4*5^2$.

There's a lot of ways to factor. The only restriction is that both $k-y$ and $k+y$ must both be even.

So solve $k - y = 2*3^b5^c$ and $k + y = 2*3^{4-b}5^{2-c}$. $k-y < k+y$

So $k - y = 2; 6; 18; 54; 50; 10; 30; 90;$

And $k+ y = 4050; 1350; 450; 150; 162; 810; 270; 90$

And $(k,y) = (2026, 2024), (678, 672),(234,216),(102,48),(106,56), (410,400), (150,120),(90,0)$

And $\sqrt{180^2 + 4y^2}= 2k = 4052,1356, 468, 204,212,820,300,180$

And $x = \frac {-180 \pm \sqrt{180^2 + 4y^2}}2 =$

$1936, 588, 144, 12, 16, 320, 60, 0$ if $x \ge 0$

If $x < 0$ then $x = -2116, -768, -324, -192, -196, -500, -240, - 180$.