Let $B$ be a positive integer. Show that the torsion subgroup of the elliptic curve $y^2 = x^3 + B$ has order dividing $6$ (Feel free to assume Dirichlet's theorem, that for any coprime $a$ and $d$ there are infinitely many primes $p$ with $p\equiv a \pmod d$, but not any stronger version of it.)
The discriminant is $\Delta = 27B^2$ so we can use reduction mod $p$ for any prime $p\geq 5$, $p\nmid B$. Using primitive roots one can easily show that if $p\equiv 2 \pmod 3$ then every remainder mod $p$ is a cube and hence that $y^2 = x^3 + B$ has exactly $p+1$ points modulo $p$ (including the point at infinity). So the order of the torsion group must divide $p+1$ for all $p\equiv 2 \pmod 3$. Then what?
Any help appreciated!
Then you have an integer $n$ which divides $p + 1$ for almost all (i.e. all except finitely many) prime numbers $p \equiv -1 \mod 6$.
Suppose that $n$ does not divide $6$. Let $m = \operatorname{lcm}(6, n)$. I claim that there is an integer $d$ which satisfies the following properties:
The existence of such a $d$ is a simple exercise in elementary number theory.
Now by Dirichlet's theorem, the arithmetic sequence $\{mk + d: k \geq 1\}$ contains infinitely many prime numbers.
In particular, since these prime numbers are all $\equiv -1\mod 6$, there must be at least one prime number $p$ of the form $mk + d$ such that $n$ divides $p + 1$.
But this contradicts our construction, as $p = mk + d \equiv d \not\equiv -1 \mod m$.