###
Primes Between Consecutive Cubes:

How many primes are there between *n*^{3} and (*n*+1)^{3}?

Legendre's conjecture states that, for each positive integer *n*,
there is *at least one prime* between *n*^{2} and (*n*+1)^{2}.
On this page, we will investigate a related question:
How many primes are there between *n*^{3} and (*n*+1)^{3}?

Here are two hypotheses – and both of them appear to be true:

(A) *For each integer n* > 0, *there are ***at least four primes**
between n^{3} *and* (*n*+1)^{3}.

(B) *For each integer n* > 0, *there are ***at least** 2*n* + 1 **primes**
between n^{3} *and* (*n*+1)^{3}.

Note that if the above statement (B) is true, then statement (A) is also true.
Indeed, for *n* = 1 both statements are easy to check – and both are true,
while for *n* ≥ 2 statement (A) follows from (B) because
2*n* + 1 > 4 for every *n* ≥ 2.
Statement (B) is suggested by these observations:

(1) For integer *m* > 1051, each interval [*m*^{3/2}, (*m*+1)^{3/2}] contains a prime
(generalized Legendre conjecture, case 3/2).

(2) For positive integers *m* and *n*, each interval [*n*^{3}, (*n*+1)^{3}] contains precisely 2*n*+1
intervals [*m*^{3/2}, (*m*+1)^{3/2}], for example:

the interval [1^{3}, 2^{3}] contains *three* intervals
[1^{3/2}, 2^{3/2}],
[2^{3/2}, 3^{3/2}],
[3^{3/2}, 4^{3/2}];
the interval [2^{3}, 3^{3}] contains *five* intervals
[4^{3/2}, 5^{3/2}],
[5^{3/2}, 6^{3/2}],
[6^{3/2}, 7^{3/2}],
[7^{3/2}, 8^{3/2}],
[8^{3/2}, 9^{3/2}];

`...`

the interval [33^{3}, 34^{3}] contains 67 intervals
[1089^{3/2}, 1090^{3/2}],`...`

[1155^{3/2}, 1156^{3/2}];
and so on.
Combining (1) and (2), we see that, since 1051^{3/2} < 1089^{3/2} = 33^{3},
statement (B) is true for *n* ≥ 33 *provided that* (1) is true.
But we already tested statement (1) and,
based on the knowledge of maximum prime gaps, (1) holds true for large numbers
(from *m* = 1052 and up to 18-digit primes).
However, *when m and n are small*, statement (1) does not help us establish (B).
Therefore, now it is of particular interest to test statement (B) directly for small *n*.
The table below presents a computational check of statement (B) for a range of consecutive small cubes –
and our computational experiment shows that (B) is apparently true.
*There are at least* 2*n* + 1 *primes
between consecutive cubes n*^{3} *and* (*n*+1)^{3}.
(We have to remember, though, that a computational check alone is *not a proof*.)

n n^{3} < primes < (n+1)^{3} How many primes? OK/fail
Expected: Actual: