1
$\begingroup$

I am writing a program to output all $a,b \in \mathbb{N}$, where $a \le b \le n$ (for a given $n \in \mathbb{N}$), such that

$$ \frac{ab}{2\sqrt{ab}+a+b}=c\in \mathbb{N} $$

For example, $a=9$, $b=36$, and $c=4$ satisfy this equation.

My program runs at a tolerable speed for values of $n<10^5$, but is not efficient enough for higher values. Is there anything of value from number theory that I can use to eliminate my options? For instance, I know that $\sqrt{ab} \in \mathbb{N}$ is a necessary (but not sufficient) condition.

$\endgroup$
3
  • $\begingroup$ It might not help, but the denominator is $(\sqrt{a}+\sqrt{b})^2$. $\endgroup$ Jul 8, 2015 at 22:22
  • $\begingroup$ Oh wow, I did not catch that at all. Thanks Michael. $\endgroup$ Jul 8, 2015 at 22:23
  • $\begingroup$ A connection with geometry: math.stackexchange.com/q/1221168 $\endgroup$
    – Jean Marie
    Jun 1, 2021 at 5:16

2 Answers 2

3
$\begingroup$

To justify Batominovski claim, we start with any solution $(a,b)$ to your diophantine equation and the radical in the denominator.

$\sqrt{ab}\in\mathbb{N}$ implies we have a natural factorization of $a=u^2C$ and $b=v^2C$ that is unique when we constrain $gcd(u,v)=1$

$$ \frac{ab}{2\sqrt{ab}+a+b}\in\mathbb{N}\Leftrightarrow\frac{Cu^2v^2}{(u+v)^2}\in\mathbb{N} $$ (as Michael Burr pointed out, the denominator is a square)

Because $gcd(u,v)=1,\ (u+v)$ cannot divide any of the factors in $uv;$ so the $C$ factor must cover the entire denominator, and so we have a natural $k$ that provides $C=k(u+v)^2$

So we have Batominvoski's construction: $$ (a,b)=(ku^2(u+v)^2,kv^2(u+v)^2),\ \ k,u,v\in\mathbb{N},\ \ \gcd(u,v)=1 $$

$\endgroup$
1
  • $\begingroup$ Thank you for the clarification, I really appreciate it. $\endgroup$ Jul 9, 2015 at 4:24
1
$\begingroup$

All solutions $(a,b)\in\mathbb{N}^2$ to the conditions $\frac{ab}{2\sqrt{ab}+a+b}\in\mathbb{N}$ and $a\leq b$ take the form $(a,b)=\left(ku^2(u+v)^2,kv^2(u+v)^2\right)$, where $k,u,v\in\mathbb{N}$ are such that $\gcd(u,v)=1$ and $u\leq v$.

$\endgroup$
1
  • $\begingroup$ That's very interesting, thanks! $\endgroup$ Jul 9, 2015 at 4:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .