I'm looking for a way to enumerate all positive integer solutions of the equation
$xyz = w^2(x+y+z)$
where $w \le W$ and $1 \le x \le y \le z$.
Could anyone provide a hint at how to approach this?
I'm looking for a way to enumerate all positive integer solutions of the equation
$xyz = w^2(x+y+z)$
where $w \le W$ and $1 \le x \le y \le z$.
Could anyone provide a hint at how to approach this?
On
$$xyz=w^2(x+y+z)$$ Decompose into factors of the number. $$tp=2w^2$$ Then the decision on the record. $$x=t$$
$$y=p$$
$$z=t+p$$
On
Generalizing individ's answer, in $xyz=w^2(x+y+z) $, if $x+y = z$, then $xy(x+y)=2w^2(x+y) $ or $xy = 2w^2$.
If $r(x+y) = z$ where $r$ is rational, then $xyr(x+y)=(1+r)w^2(x+y) $ or $rxy = (1+r)w^2$ or $xy = (1+\frac1{r})w^2 $.
Therefore, for each $w^2$, for any $r$ such that $w^2/r$ is an integer, look at all the factorizations of $w^2(1+1/r)=xy$.
In particular, if $r = \frac1{n}$ for integer $n$, let $xy$ go over the factors of $(n+1)w^2$, choose those where $n$ divides $x+y$, and let $z = (x+y)/n$.
To verify, $xyz =(n+1)w^2(1/n)(x+y) =(n+1)w^2(x+y)/n $ and $w^2(x+y+z) =w^2(x+y+(x+y)/n) =w^2(x+y)(n+1)/n $.
If $r=1$, this gives the first solution.
If $r=2$, we look at the factors of $xy=3w^2$ with the same parity (this implies that $w$ is even), and let $z = (x+y)/2$.
For general $n$, we want $n | x+(n+1)w^2/x$.
It's getting late and I'm tired, so I'll stop here.
I ended up using the following method for computing the answer: first, multiply both sides by $x$ and factor the equation as
$$(xz - w^2)(xy - w^2) = w^2(x^2 + w^2)$$
Then iterating through all $x$ and $w$ I factorize the right-hand side, find all its divisors $f$ and leave only those that yield integer values
$$z = (w^2 + f)/x, \qquad y = w^2(x^2+w^2 + f)/(xf)$$