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.$ 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.
 A: Here is a more detailed plan. The first hint was indeed unclear.

*

*It follows from the conditions that for all positive integers $m$ the number $an+1$, where $n=\frac{(bm+1)^3-1}{b}$ is a perfect cube.
In other words, for every $m$ the number $ab^2m^3+3abm^2+3ma+1$ is a cube of positive integer.


*Define a polynomial $p(x)=ab^2x^3+3abx^2+3ax+1$. We know that $p(x)$ is a perfect cube if $x$ is a positive integer. Our goal is to prove that $p(x)=(rx+s)^3$ for some integers $r$ and $s$.


*We will show a more general fact: suppose that a polynomial $p$ of degree $d$ with integer coefficients is a perfect $d$-th degree whenwver $x$ is a positive integer. Then, $p(x)$ equals $(rx+s)^d$ for some positive integers $r$ and $s$.


*We will suppose that the leading coefficient of $p$ is $\alpha>0$. Then, it is clear that for some $M>0$ and all sufficiently large $n$ we have inequalities
$$
(\alpha^{1/d}n-M)^d<p(n)<(\alpha^{1/d}n+M)^d.
$$
On the other hand, for each $n$ we have $p(n)=k_n^d$ for some positive integer $k_n$. Thus, $k_n\in(\alpha^{1/d}n-M,\alpha^{1/d}n+M)$ for all sufficiently large $n$.


*The next step is to show that $k_n-\alpha^{1/d}n$ has a finite limit $\beta$ when $n\to\infty$. It follows from the existence of limit
$$
\lim_{n\to\infty}\frac{p(n)-\alpha n^d}{n^{d-1}}=\lim_{n\to\infty}\frac{k_n^d-\alpha n^d}{n^{d-1}}.
$$


*Now we have $k_n=\alpha^{1/d}n+\beta+o(1)$, when $n\to\infty$. However, if $\alpha^{1/d}$ is not an integer, then it is irrational. Hence, due to the Kronecker Theorem, there exist infinitely many positive integers $n$ such that $(\alpha^{1/d}n+\beta-1/3,\alpha^{1/d}n+\beta+1/3)$ does not contain integers which contradicts to the fact that $k_n\in\mathbb{Z}$.


*Now we know that $\alpha^{1/d}$ is an integer, so is $\alpha^{1/d}n$. It follows that $\beta\in\mathbb{Z}$ and, moreover, $k_n=\alpha^{1/d}n+\beta$ for all large $n$.


*Since $p(n)=k_n^d=(\alpha^{1/d}n+\beta)^d$ for large $n$ we must have $p(x)=(\alpha^{1/d}x+\beta)^d$ as desired.


*Now return to the problem. We have
$$
(rx+s)^3=ab^2x^3+3abx^2+3ax+1.
$$
Comparison of coefficients yields that $a=b$.
A: 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$.
A: As noted in the answer above by @richrow, the crux is showing that, if $a \not =b$, there is an integer $M$ such that $ab^2M^3+3abM^2+3aM+1$ is not a perfect cube. Note also that we may also assume that $a<b$. We give an alternative proof of this, that does not use the Kronecker Theorem.
Case 1: $ab^2$ is not a perfect cube. To this end first let $M_1,M_2,M_3\ldots$ be an infinite sequence of positive integers satisfying $\phi(M_k)$ not divisible by $3$ for each $k$, where $\phi(\cdot)$ is the Euler totient function; each $M_k$ a product of the first $k$ primes $p_1,p_2$ where each $p_i =2\pmod 3$ will do--or even simpler $M_k =2^k$ for each integer $k$ will work. Then that $3$ does not divide $\phi(M_k)$ implies the following:

For each $k$: If an integer $c$ satisfies $c^3 \equiv_1 M_k$, then $c \equiv_1 M_k$.

Thus, for each $k$, let us write $f(M_k)=ab^2M_k^3+3abM_k^2+3aM_k$. Then the following holds:

Claim 1: For each $k=1,2,\ldots$, if $f(M_k)$ is a perfect cube, then $f(M_k)$ must then be of the form $f(M_k) = (c_kM+1)^3$ for some integer $c_k$.

Furthermore, as $ab^2$ is integral and not a perfect cube, iy follows that the inequality $|c^3_k -ab^2| \ge 1$ holds. Also clearly $c_k \le ab^2+3ab+3a+1$ $=O(1)$.
Then suppose that each $f(M_k)$ is a perfect cube. Then by Claim 1, $f(M_k)=(c_kM_k+1)^3$ for each integer $k$. So on the one hand, the following is true:
$$f(M_k)-c^3_kM^3_k$$ $$= 3c^2_kM^2_k + 3c_kM_k +1$$
$$= O(M_k^2) \quad  \forall k=1,2, \ldots.$$ However,  the inequality $|ab^2-c^3_k| \ge 1$ holds for all $k$. So on the other hand, the following is also true:
$$|f(M_k)-c^3_kM^3_k| \ge M^3_k\pm O(M^2_k)$$ $$=\theta(M^3_k) \quad \forall k=1,2,3,\ldots.$$ Now as both of the above cannot be simultaneously true for an infinite number of $k$ however, so we arrive at a contradiction. So it follows that $f(M_k)$ can be a perfect cube for only finitely many of the $M_k$s, and thus there exists a $k$ such that $f(M_k)$ is not a perfect cube for the case where $ab^2$ is not a perfect cube. So the result follows if $a$ and $b$ satisfy Case 1.
Case 2: $ab^2$ is a perfect cube. Then assume $a<b$ and so writing $ab^2=c^3$, it follows that $c<b$ and so $3ab=3c^3/b <3c^2$, and similarly $3a < 3c$. So then for each integer $M$:
$$c^3M^3 < ab^2M^3 + 3abM^2+3aM+1$$ $$ < c^3M^3+3c^2M^2+3cM+1 = (cM+1)^3.$$
So here $ab^2M^3+3abM^2+3aM+1$ cannot be a perfect cube in the case where $ab^2$ is a perfect cube, so the result follows if $a$ and $b$ satisfy Case 2 as well.
