OFFSET
1,1
COMMENTS
38 is an average of first n=23 primes; 110 (n=53); 3066 (n=853); 60020(n=11869). For other n, an average of first n primes is non-integer, in general the function "mean prime(n)" may be non-monotonic, in places of large gaps between primes.
In case of a tie, round down. Thus a(2) = 2, not 3. The next cases where this arises are a(1810) = 7265 and a(2458) = 10285. - Robert Israel, Oct 02 2015
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
38 is an average of first n=23 primes; 110 (n=53);
MAPLE
rd:= t -> ceil(t+1/2)-1:
Primes:= select(isprime, [2, seq(2*i+1, i=1..1000)]):
S:= ListTools:-PartialSums(Primes):
zip((a, b) -> rd(a/b), S, [$1..nops(S)]); # Robert Israel, Oct 02 2015
MATHEMATICA
rnd[n_]:=Block[{ip=IntegerPart[n]}, If[n>ip+1/2, ip+1, ip]]; r=Range@1000; rnd@#&/@(Accumulate[Prime[r]]/r) (* Robert G. Wilson v Oct 02 2015 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Zak Seidov, Oct 11 2002
STATUS
approved