Kvant Math Problem 547
The equation is
Verified: no
Verdicts: SKIP + SKIP
Solve time: 10m01s
Source on kvant.digital
Problem
For the equation $\dfrac1x-\dfrac1y=\dfrac1n$, where $n$ is a positive integer, to have a unique solution in positive integers $x$, $y$, it is necessary and sufficient that $n$ be prime. Prove this.
A. Danielyan
Exploration
The equation is
$$\frac1x-\frac1y=\frac1n,$$
with $x,y,n\in\mathbb Z_{>0}$.
First rewrite it:
$$\frac{y-x}{xy}=\frac1n,$$
hence
$$n(y-x)=xy.$$
Moving all terms to one side gives
$$xy+nx-ny=0.$$
Adding and subtracting $n^2$ yields
$$(x-n)(y+n)=n^2.$$
This factorization is the natural starting point.
Try small values.
For $n=2$,
$$(x-2)(y+2)=4.$$
The positive divisors of $4$ are $1,2,4$. Since $y+2>2$, only $(x-2,y+2)=(1,4)$ works, giving $(x,y)=(3,2)$. There is exactly one solution.
For $n=3$,
$$(x-3)(y+3)=9.$$
Possible positive factor pairs are $(1,9)$ and $(3,3)$ and $(9,1)$. The latter two do not give positive $y$. Only $(1,9)$ works, producing $(4,6)$. Again unique.
For $n=4$,
$$(x-4)(y+4)=16.$$
Factor pairs with second factor exceeding $4$ are $(1,16)$ and $(2,8)$. They give
$$(x,y)=(5,12),\qquad (6,4).$$
Thus there are two solutions.
This suggests that uniqueness occurs exactly when $n$ has only two positive divisors, namely when $n$ is prime.
The delicate point is counting solutions correctly from the factorization. One must determine exactly which divisors of $n^2$ correspond to positive integer solutions.
Problem Understanding
We must determine for which positive integers $n$ the equation
$$\frac1x-\frac1y=\frac1n$$
has exactly one solution in positive integers $(x,y)$.
This is a Type A problem, a classification problem. We must prove both directions: every prime $n$ yields a unique solution, and every composite $n$ yields more than one solution.
The core difficulty is translating the Diophantine equation into a factorization and then counting all positive solutions without omission or duplication.
The answer should be that the required integers are precisely the prime numbers. Intuitively, after transforming the equation into
$$(x-n)(y+n)=n^2,$$
solutions correspond to divisors of $n^2$. When $n$ is prime, only one divisor of $n^2$ is smaller than $n$; when $n$ is composite, there are at least two such divisors, producing at least two solutions.
Proof Architecture
Lemma 1. The equation is equivalent to
$$(x-n)(y+n)=n^2.$$
This follows by elementary algebra.
Lemma 2. Positive integer solutions are in one-to-one correspondence with positive divisors $d$ of $n^2$ satisfying $d<n$.
Set $d=x-n$; then $y+n=n^2/d$, and positivity of $y$ is equivalent to $n^2/d>n$, namely $d<n$.
Lemma 3. If $n=p$ is prime, the only positive divisor of $p^2$ smaller than $p$ is $1$.
Hence exactly one solution exists.
Lemma 4. If $n$ is composite, then $1$ and some proper divisor $d$ with $1<d<n$ are both divisors of $n^2$ smaller than $n$.
Lemma 2 then gives at least two distinct solutions.
The hardest direction is proving that every composite $n$ produces more than one solution. The point requiring the most care is the correspondence between divisors $d<n$ and solutions.
Solution
Starting from
$$\frac1x-\frac1y=\frac1n,$$
multiply by $nxy$:
$$n(y-x)=xy.$$
Rearranging,
$$xy+nx-ny=0.$$
Adding $n^2$ to both sides gives
$$xy+nx-ny+n^2=n^2,$$
hence
$$(x-n)(y+n)=n^2.$$
Thus the original equation is equivalent to
$$(x-n)(y+n)=n^2.$$
Let
$$d=x-n.$$
Then $d$ is a positive divisor of $n^2$, and
$$y+n=\frac{n^2}{d}.$$
Conversely, every positive divisor $d$ of $n^2$ determines
$$x=n+d,\qquad y=\frac{n^2}{d}-n.$$
For $y$ to be positive we must have
$$\frac{n^2}{d}>n,$$
which is equivalent to
$$d<n.$$
Therefore positive integer solutions are in one-to-one correspondence with positive divisors $d$ of $n^2$ satisfying $d<n$.
Assume first that $n=p$ is prime. The positive divisors of $p^2$ are
$$1,\ p,\ p^2.$$
Among them, the only divisor smaller than $p$ is $1$. Hence there is exactly one admissible value of $d$, namely $d=1$. The corresponding solution is
$$x=p+1,\qquad y=p^2-p.$$
Thus the equation has a unique positive integer solution.
Now assume that $n$ is composite. Then $n$ possesses a proper divisor $d$ such that
$$1<d<n.$$
Since $d\mid n$, we also have $d\mid n^2$. Both $1$ and $d$ are positive divisors of $n^2$ smaller than $n$. By the correspondence established above, they produce two solutions:
for $d=1$,
$$x=n+1,\qquad y=n^2-n,$$
and for the proper divisor $d$,
$$x=n+d,\qquad y=\frac{n^2}{d}-n.$$
These solutions are distinct because the values of $x$ are different. Hence the equation has at least two positive integer solutions.
We have shown that a prime $n$ yields exactly one solution, while a composite $n$ yields more than one solution. Therefore the equation has a unique solution in positive integers if and only if $n$ is prime.
$$\boxed{\text{$n$ is prime}}$$
Verification of Key Steps
The factorization must be checked carefully:
$$n(y-x)=xy$$
gives
$$xy+nx-ny=0.$$
After adding $n^2$,
$$xy+nx-ny+n^2=n^2,$$
and the left-hand side indeed factors as
$$(x-n)(y+n).$$
A sign error here would completely change the counting argument.
The correspondence with divisors requires positivity of $y$. From
$$y=\frac{n^2}{d}-n,$$
positivity is
$$\frac{n^2}{d}-n>0.$$
Since $d>0$, this is equivalent to
$$n^2>nd,$$
hence
$$d<n.$$
The case $d=n$ gives $y=0$, which is not allowed, so strict inequality is essential.
For composite $n$, one must verify that the second solution is genuinely different from the first. The divisor $d$ satisfies $d>1$, whereas the first solution comes from $d=1$. Since
$$x=n+d,$$
different divisors give different values of $x$, so the two solutions cannot coincide.
Alternative Approaches
After obtaining
$$(x-n)(y+n)=n^2,$$
one may count solutions by pairing complementary divisors of $n^2$. Every positive solution corresponds to a factorization
$$n^2=ab$$
with $a<n<b$, and then
$$x=n+a,\qquad y=b-n.$$
For a prime $n=p$, the only such factorization is
$$p^2=1\cdot p^2.$$
For composite $n$, the existence of a proper divisor $d$ immediately yields the additional factorization
$$n^2=d\cdot\frac{n^2}{d},$$
giving a second solution.
The main proof is preferable because it establishes a direct bijection between solutions and divisors $d<n$, reducing the problem to a simple divisor count.