OFFSET
2,1
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 2..10000
FORMULA
EXAMPLE
a(4)=15 because the smallest prime greater than 4^2 is 17, the largest prime less than 4^2 is 13, and the average of 17 and 13 is 15.
MATHEMATICA
Table[n2=n^2; (NextPrime[n2, -1]+NextPrime[n2])/2, {n, 2, 100}] (* Vladimir Joseph Stephan Orlovsky, Mar 09 2011 *)
PROG
(PARI) a(n) = (nextprime(n^2) + precprime(n^2))/2; \\ Michel Marcus, May 20 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Henry Bottomley, Jul 12 2000
STATUS
approved