A075465 Rounded average of first n primes.
2, 2, 3, 4, 6, 7, 8, 10, 11, 13, 15, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 45, 47, 49, 51, 53, 55, 58, 60, 63, 65, 67, 70, 72, 75, 77, 80, 82, 85, 87, 90, 92, 94, 97, 100, 102, 105, 107, 110, 113, 115, 118, 121, 123, 126, 128, 131, 133, 136
Offset: 1
Examples
38 is an average of first n=23 primes; 110 (n=53);
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
Comments