<s>[INST] 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.
 [/INST] 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.
</s>