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.

A121844 Excess of n^3 over previous prime.

Original entry on oeis.org

1, 4, 3, 12, 5, 6, 3, 2, 3, 4, 5, 18, 3, 2, 3, 4, 5, 2, 7, 4, 9, 4, 17, 6, 3, 2, 9, 10, 7, 2, 19, 4, 3, 12, 7, 2, 3, 38, 3, 4, 11, 14, 25, 4, 9, 10, 5, 6, 9, 4, 5, 4, 7, 12, 15, 4, 9, 22, 17, 38, 7, 4, 5, 16, 5, 2, 9, 28, 11, 28, 17, 14, 3, 28, 9, 4, 5, 12, 3, 58, 5, 4, 11, 12, 13, 16, 21, 22, 7, 2, 7
Offset: 2

Views

Author

Zak Seidov, Aug 29 2006

Keywords

Examples

			a(5)=12 because 5^3=125 and previous prime is 113 hence a(5)=125-113=12
		

Crossrefs

Cf. A077037.

Programs

  • Mathematica
    Table[n^3-Prime[PrimePi[n^3]],{n,2,100}]
    #-NextPrime[#,-1]&/@((Range[2,100])^3) (* Harvey P. Dale, Apr 06 2013 *)
  • PARI
    a(n) = n^3 - precprime(n^3 - 1) \\ Michel Marcus, Jun 03 2013