Characterize all positive integers $x$, $y$, and $z$ such that:

$$\dfrac{1}{x} + \dfrac{1}{y} = \dfrac{1}{z}$$

For example, $\dfrac{1}{x+1} + \dfrac{1}{x(x+1)} = \dfrac{1}{x}$.


5 Answers 5


The solutions are parameterized by $$x = p^2+pq, y= q^2+pq, z = pq$$ where $p,q$ are arbitrary integer numbers, chosen so that $x,y,z$ are all unequal zero.

The reason for this is that $1/x + 1/y = 1/z$ describes a projective curve in 2-dimensional projective space ${\mathbf P}^2$, given by the homogeneous equation $$(1) \quad y z + x z - x y = 0$$

The equation is of degree $2$ and so every line $l$ intersects it in two points $P_l$ and $Q_l$. Keeping $P=P_l$ fixed and with rational coordinates, the points $Q_l$ are also with rational coordinates when $l$ is a line with rational slope. Furthermore every rational point $Q$ defines a rational line $l$ with $Q = Q_l$. So the lines $l$ through $P$ with rational slope trace out the rational points of $C$, called $C({\mathbb Q})$. As the curve $C$ is projective we have $C({\mathbb Z}) = C({\mathbb Q})$. So the rational and the integer solutions to (1) are identical after multiplying away denominators.

Now take as point $P=(0,0,1)$ and do the calculation explicity on the affine patch $z=1$ where (1) becomes $y+x-xy = 0$. Making the ansatz $x=w,y=p/q \,w$ and solving for $w$ we find the solutions $0, (p+q)/p$. So $x=(p+q)/p$ and $y=(p+q)/q$ are the rational solutions of the affine equation. Bringing this to a common denominator $pq$ we receive the homogeneous solution from the beginning.

  • $\begingroup$ Does this need to add in non-relatively prime solutions? with $(p,q)=(2,1)$, this captures $(x,y,z)=(6,3,2)$. But how does this capture $(x,y,z)=(12,6,4)$? $\endgroup$
    – 2'5 9'2
    Feb 26, 2015 at 21:55
  • $\begingroup$ You are right, one has to multiply each solution from above with an integer factor to trace out all (x,y,z). Additionally one can assume gcd(p,q) = 1 as p/q is the slope of the line l. So one arrives at the solution given above by Barry Cipra. $\endgroup$ Feb 26, 2015 at 22:13
  • $\begingroup$ If you take $\frac{1}{p} + \frac{1}{q} = \frac{p+q}{pq}$ and divide through by $p+q$ you get $\frac{1}{p^2 + pq} + \frac{1}{q^2 + pq} = \frac{1}{pq}$. I was aware that this was suficient, now I see that, with the obvious modifications, it is also necessary. Thanks. $\endgroup$ Feb 26, 2015 at 22:34

${1\over x}+{1\over y}={1\over z}$ if and only if it has the form

$${1\over a(a+b)d}+{1\over b(a+b)d}={1\over abd}\quad\text{with}\quad \gcd(a,b)=1$$

(all variables being understood as positive integers).

The "if" part is trivial to verify. The "only if" part comes by setting $x=ga$ and $y=gb$ with $g=\gcd(x,y)$, which gives

$${1\over x}+{1\over y}={a+b\over gab}$$

and noting that $a+b$ is relatively prime to both $a$ and $b$.


An idea : you have

$$\frac{1}{x}+\frac{1}{y} = \frac{x+y}{xy}$$

It imply that $x+y | xy$

  • $\begingroup$ Indeed, it's equivalent. $\endgroup$
    – Jack M
    Feb 26, 2015 at 20:44

$\frac{1}{x} + \frac{1}{y}=\frac{x+y}{xy}$ then we have to found $(x,y)\in \mathbb N^{2}$ such that $x+y|xy$ then $k(x+y)=xy$ if and only if $x=\frac{ky}{y-k}$ then $k<y$ and $y-k|ky$ , then fixed y you can find a solution choosing $y-k$ as a divisor of y.(Note that if y is prime we not have solution)


For the equation.


The easiest way is to factor the square.


Then decisions can be recorded.




For the more General case formula there. Number of solution for $xy +yz + zx = N$


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