login
Difference between n^3 and next prime.
1

%I #15 Nov 22 2020 21:18:15

%S 2,1,3,2,3,2,7,4,9,4,9,30,5,6,5,14,3,6,7,4,9,16,3,30,5,4,3,4,9,2,11,

%T 12,3,14,9,24,7,18,5,14,7,6,5,24,9,2,31,14,5,10,3,10,3,14,13,18,5,28,

%U 9,12,23,10,3,2,3,2,5,16,9,2,19,2,25,6,3,16,3,6,5,4,9,16,13,2,19,4,3,4,9,14

%N Difference between n^3 and next prime.

%C From Ingham (1937) it follows that there is a prime between x^3 and (x+1)^3 if x is sufficiently large: see A060199 for further details. - _M. F. Hasler_, Nov 09 2020

%H Charles R Greathouse IV, <a href="/A121842/b121842.txt">Table of n, a(n) for n = 0..10000</a>

%H A. E. Ingham, <a href="https://doi.org/10.1093/qmath/os-8.1.255">On the difference between consecutive primes</a>. Quarterly Journal of Mathematics. Oxford Series. 8 (1) (1937) p. 255-266 (doi:10.1093/qmath/os-8.1.255).

%F a(n) = A013632(n^3) = A013632(A000578(n)). - _Michel Marcus_, Oct 10 2013

%e a(6)=7 because next prime after 6^3=216 is 223 and 223-216=7.

%t Array[NextPrime[#] - # &[#^3] &, 90, 0] (* _Michael De Vlieger_, Nov 12 2020 *)

%o (PARI) a(n) = nextprime(n^3) - n^3; \\ _Michel Marcus_, Oct 10 2013

%Y Cf. A060199 (number of primes between consecutive cubes).

%K nonn,easy

%O 0,1

%A _Zak Seidov_, Aug 29 2006