# Dealing with Integers Extension

This post stated an easy Number Theory question regarding the number of solutions of the Diophantine equation $$x(x+z)=y^2$$.

I decided to make the question a bit more interesting:

Characterize all positive integer solutions to $$x(x+z)=y^2$$ given that $$2y-2x\ge z-1$$.

Indeed, the following is also true:

Given that $$x,y,z$$ are positive integers that satisfy both $$x(x+z)=y^2$$ and $$2y-2x\ge z-1$$, then it follows that $$2y-2x=z-1$$.

My solution is elementary, but well-hidden. I await your solutions.

Note by Daniel Liu
3 years, 1 month ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

Nice solutions Surya Prakash , Ivan Koswara . Here is mine:

Note that $$2y-2x\ge z-1\implies y\ge x+\dfrac{z-1}{2}$$

However, we also know trivially that $$y^2=x(x+z) <\left(x+\dfrac{z}{2}\right)^2$$ so we have the following bounds: $x+\dfrac{z-1}{2}\le y <x+\dfrac{z}{2}$ Since $$y$$ is an integer, it follows that $$z$$ must be odd and $$y=x+\dfrac{z-1}{2}$$. Thus we have $$\boxed{2y-2x= z-1}$$

This also means $$z=2t+1$$. Solving $$x(x+z)=\left(x+\dfrac{z-1}{2}\right)^2$$ gives $$x=t^2$$, and finally $$y=t^2+t$$ so our parameterization is $\boxed{(x,y,z)=(t^2, t^2+t, 2t+1)}$

- 3 years, 1 month ago

It is clear from $$x(x+z) = y^{2}$$ that $$x$$, $$x+z$$ and $$y$$ are in G.P. But since they are distinct, it follows that $$x<y<x+z$$. So, $$x$$, $$y$$ and $$x+z$$ are in G.P. with intial term $$a=x$$ and with common difference $$r=\dfrac{x+z}{y}$$. Now, $$a+ar^{2} > 2 ar$$, I mean that the sum of the extremes is greater than twice the middle term in a G.P. with three terms (Equality does not hold since $$r>1$$.) So,

$(x+z)+x > 2y$ $z > 2y - 2x$ $z-1 \geq 2y -2x$

But given that $$2y-2x \geq z-1$$. It holds that $$2y - 2x = z- 1$$.

- 3 years, 1 month ago

Comment deleted Aug 30, 2015

No, it's $$x, y, x+z$$ in GP, since we have $$\frac{x}{y} = \frac{y}{x+z}$$.

- 3 years, 1 month ago

yeah, I mistaken.

- 3 years, 1 month ago

The first solution that comes to my mind:

For Diophantine equation $$a^2 = bc$$ for $$a,b,c$$ being positive integers, we can parametrize the solutions as $$(a,b,c) = (kmn,km^2,kn^2)$$ where $$k,m,n$$ are positive integers and $$\gcd(m,n) = 1$$. Essentially, take the GCD of $$b,c$$, which is $$k$$; this must divide $$a$$ as well. For the rest, each of $$\frac{b}{k}, \frac{c}{k}$$ must be squares; an unmatched divisor of $$\frac{b}{k}$$ must also exist in $$\frac{c}{k}$$ (to make a square), but this contradicts that the two are now relatively prime (since we have removed their GCD).

Using this to the equation $$x(x+z) = y^2$$, we have $$x = km^2, x+z = kn^2, y = kmn$$. Since $$z > 0$$, we have $$kn^2 > km^2$$ or $$n > m$$.

The condition is:

\begin{align*} 2y-2x &\ge z-1 \\ 1 &\ge z+2x-2y \\ 1 &\ge x + (x+z) - 2y \\ 1 &\ge km^2 + kn^2 - 2kmn \\ 1 &\ge k(n-m)^2 \end{align*}

We know that $$k \ge 1$$ as it's a positive integer. We also know that $$n > m$$, and since $$m,n$$ are integers, we have $$n-m \ge 1$$. Thus equality is achieved; we have $$k = 1, n-m = 1$$. In other words, $$(x,y,z) = (m^2, m(m+1), 2m+1)$$. This can be verified to satisfy the equation for all positive integer $$m$$.

- 3 years, 1 month ago