cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A121842 Difference between n^3 and next prime.

Original entry on oeis.org

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, 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, 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
Offset: 0

Views

Author

Zak Seidov, Aug 29 2006

Keywords

Comments

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

Examples

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

Crossrefs

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

Programs

  • Mathematica
    Array[NextPrime[#] - # &[#^3] &, 90, 0] (* Michael De Vlieger, Nov 12 2020 *)
  • PARI
    a(n) = nextprime(n^3) - n^3; \\ Michel Marcus, Oct 10 2013

Formula

a(n) = A013632(n^3) = A013632(A000578(n)). - Michel Marcus, Oct 10 2013