Find all relative prime positive integers $p$ and $q$ such that $p+q=(p-q)^3$.

198 Views Asked by At

Find all relative prime positive integers $p$ and $q$ such that $p+q=(p-q)^3$.

Attempt: I divide it into $4$ cases as follows:

  1. both $p$ and $q$ are prime;
  2. $p$ is prime, $q$ is composite;
  3. $p$ is composite, $q$ is prime; and
  4. both $p$ and $q$ are composite.

Here's what I tried for the first case: I provide two different ways:

First way: Clearly, $p>q$. Since $p-q \equiv 2p \pmod{(p+q)}$, then $$0 \equiv 8p^3 \pmod{(p+q)}. \tag 1$$ Since $p$ and $q$ are relative prime, then so are $p$ and $p+q$. Hence, (1) becomes $0 \equiv 8 \pmod{(p+q)}$ so that $(p+q) \mid 8$. It's not hard to check that the only solution is $(p,q)=(5,3)$. Verifying back to the original equation, we obtained that $5+3=8=2^3=(5-3)^3$ which is true.

Second way: Let $k=p-q$. Then $k+2q=p+q$ so that $k^3=k+2q$. Hence, $$k^3=k+2q \implies k(k+1)(k-1)=2q.$$ Since $q$ is prime, then we must have that $k-1=1$, yielding $p-q=2.$ Now, notice that $$(p-q)^3=p+q \implies p+q=8.$$ Thus, we have $p=5$ and $q=3$. Therefore, the only solution is $(p,q)=(5,3)$. Verifying back to the original equation, we obtained that $5+3=8=2^3=(5-3)^3$ which is true.

Now, I have no idea how to show the rest. Anyone could help please? Many thanks in advanced.

3

There are 3 best solutions below

1
On BEST ANSWER

Since $p-q\mid p+q$, we have $p-q\mid (p+q)+(p-q) = 2p$ and $p-q\mid (p+q)-(p-q) = 2q$, hence $p-q\mid 2\gcd(p, q) = 2$. We divide cases.

(i) $p-q = 1$: then $p = q+1$, so the equation reduces to $2q+1 = 1^3$, which is impossible.

(ii) $p-q = 2$: then $p = q+2$, and $2q+2 = 2^3 = 8$, $q = 3$. Hence $p=5$, and this is actually a solution.

Thus the only solution is $p=5, q=3$. Note that $p+q>0$ so $p-q>0$, too.

2
On

Let $n=p-q. $ Then $$p=\frac{n^3+n}2,\quad q=\frac{n^3-n}2.$$ If $n$ is odd then it divides $p,q$ (because $n^2\pm1$ is even). This is impossible because $q$ would be equal to $\frac{1^3-1}2=0.$

If $n=2m$ then $m$ divides $p,q$ hence $$n=2,\quad p=5,\quad q=3.$$

2
On

Let $p$ and $q$ be two positive integers satisfying $$p+q=(p-q)^3.$$ Let $r:=p-q$ so that $q=p-r$ and so \begin{eqnarray} p&=&\frac{r^3+r}{2}=\frac12r(r^2+1),\\ q&=&\frac{r^3-r}{2}=\frac12r(r+1)(r-1). \end{eqnarray} Conversely, for any integer $r>1$ these values of $p$ and $q$ yield a solution in positive integers, so these are all solutions. Of course if $r$ is odd then both $p$ and $q$ are divisible by $r$, so they are not coprime. Similarly, if $r$ is even then $p$ and $q$ are both divisible by $\tfrac r2$, so they are not coprime unless $r=2$. So the only coprime solution is $(p,q)=(5,3)$.