Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #22 Jun 17 2024 08:50:04
%S 2,5,10,17,28,41,58,77,100,129,160,197,238,281,328,381,440,167,568,
%T 639,712,791,38,321,212,1161,1264,1371,1480,531,1720,1851,1988,2127,
%U 2276,809,2584,2747,2914,3087,3266,1149,3638,3831,4028,4227,4438,4661
%N Numerator of mean of first n primes.
%H Chai Wah Wu, <a href="/A301273/b301273.txt">Table of n, a(n) for n = 1..10000</a>
%H Joel E. Cohen, <a href="http://lab.rockefeller.edu/cohenje/assets/file/415PrimesTwinPrimesTaylorsLawAmStatistician2016.pdf">Statistics of Primes (and Probably Twin Primes) Satisfy Taylor’s Law from Ecology</a>, The American Statistician, 70 (2016), 399-404.
%e The means are 2, 5/2, 10/3, 17/4, 28/5, 41/6, 58/7, 77/8, 100/9, 129/10, 160/11, 197/12, 238/13, 281/14, 328/15, 381/16, 440/17, 167/6, 568/19, 639/20, 712/21, 791/22, 38, 321/8, 212/5, ...
%p m := n -> add(ithprime(j),j=1..n)/n;
%p m1:=[seq(m(n),n=1..100)];
%p m2:=map(numer,m1); # A301273
%p m3:=map(denom,m1); # A301274
%p m4:=map(round,m1); # A301277
%t a[n_] := Prime @ Range[n] // Mean // Numerator;
%t a /@ Range[100] (* _Jean-François Alcover_, Nov 16 2019 *)
%o (Python)
%o from fractions import Fraction
%o from sympy import prime
%o A301273_list, mu = [], Fraction(0)
%o for i in range(1,10001):
%o mu += (prime(i)-mu)/i
%o A301273_list.append(mu.numerator) # _Chai Wah Wu_, Mar 22 2018
%Y Mean and variance of primes: A301273/A301274, A301275/A301276, A301277, A273462.
%K nonn,frac
%O 1,1
%A _N. J. A. Sloane_, Mar 18 2018