OFFSET
2,2
EXAMPLE
a(5)=12 because 5^3=125 and previous prime is 113 hence a(5)=125-113=12
MATHEMATICA
Table[n^3-Prime[PrimePi[n^3]], {n, 2, 100}]
#-NextPrime[#, -1]&/@((Range[2, 100])^3) (* Harvey P. Dale, Apr 06 2013 *)
PROG
(PARI) a(n) = n^3 - precprime(n^3 - 1) \\ Michel Marcus, Jun 03 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Aug 29 2006
STATUS
approved