OFFSET
2,1
COMMENTS
First term is not an integer.
LINKS
Harry J. Smith, Table of n, a(n) for n = 2..1000
EXAMPLE
n=4: a(4) = 70 because the smallest prime greater than 4^3 is 67, the largest prime less than 5^3 is 113, the average of 67 and 113 is 90, and 90 - 4*5 = 70.
MATHEMATICA
Table[Mean[{NextPrime[n^3], NextPrime[(n+1)^3, -1]}]-n(n+1), {n, 2, 40}] (* Harvey P. Dale, Feb 21 2022 *)
PROG
(PARI) j=[]; for(n=2, 60, j=concat(j, (precprime((n+1)^3)+nextprime(n^3))/2-n*(n+1))); j
(PARI) { for (n=2, 1000, a=(precprime((n + 1)^3) + nextprime(n^3))/2 - n*(n + 1); write("b063036.txt", n, " ", a) ) } \\ Harry J. Smith, Aug 16 2009
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jason Earls, Aug 03 2001
STATUS
approved