TITLE: Let $a$ and $b$ be positive integers such that $an + 1$ s a cube if and only if $ bn + 1$ is a cube. Prove that $a = b.$
QUESTION [9 upvotes]: Let $a$ and $b$ be positive integers such that $an + 1$ is a cube if and only if $bn + 1$ is a cube. Prove that $a = b.$
By choosing $p_n^3 \equiv 1 \mod b$ , we find that there are infinitely many numbers $n$ such that $:bn+1=p_n^3\Rightarrow an+1=q_n^3$
So we have : $(a-b)n = q_n^3-p_n^3 \Rightarrow (a-b)$ is a divisor of an infinite number of numbers $T$ of the form$:T=p^3-q^3$
This is a quite hard problem for me. Any assistance would be appreciated.

REPLY [2 votes]: Here's a fairly short proof.
There are infinitely many positive integers $n$ for which $abn+1$ is a cube $x^3$ (any $x\equiv 1\pmod{ab}$ works). Then, $a^2n+1$ and $b^2n+1$ must both be cubes; say $a^2n+1=y^3$ and $b^2n+1=z^3$. We have
$$(y^3-1)(z^3-1)=(a^2n)(b^2n)=(abn)^2=(x^3-1)^2;$$
rearranging gives
$$y^3+z^3-2x^3=(yz)^3-x^6.$$
If $x^2=yz$, then $y^3+z^3=2x^3$, and so $(a^2+b^2)n=2abn$ and $a=b$. So, if $a\neq b$, $x^2\neq yz$, which means
$$\left|y^3+z^3-2x^3\right|=\left|(yz)^3-x^6\right|\geq\min_{t\in\mathbb Z_{\neq 0}}\left|(x^2-t)^3-x^6\right|=3x^4-3x^2+1.$$
If $y^3+z^3\leq 2x^3$, then $|y^3+z^3-2x^3|<2x^3$, which contradicts the above inequality for $x>1$. So $y^3+z^3>2x^3$, and
$$\max(y^3,z^3)\geq \frac{y^3+z^3}2\geq x^3+\frac{3x^4-3x^2+1}2\geq x^4+1.$$
Let $z\geq y$, so that $z^3-1\geq x^4$. Then $b^2n\geq (abn+1)^{4/3}$, which can't hold for large $n$.