cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A301273 Numerator of mean of first n primes.

This page as a plain text file.
%I A301273 #22 Jun 17 2024 08:50:04
%S A301273 2,5,10,17,28,41,58,77,100,129,160,197,238,281,328,381,440,167,568,
%T A301273 639,712,791,38,321,212,1161,1264,1371,1480,531,1720,1851,1988,2127,
%U A301273 2276,809,2584,2747,2914,3087,3266,1149,3638,3831,4028,4227,4438,4661
%N A301273 Numerator of mean of first n primes.
%H A301273 Chai Wah Wu, <a href="/A301273/b301273.txt">Table of n, a(n) for n = 1..10000</a>
%H A301273 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 A301273 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 A301273 m := n -> add(ithprime(j),j=1..n)/n;
%p A301273 m1:=[seq(m(n),n=1..100)];
%p A301273 m2:=map(numer,m1); # A301273
%p A301273 m3:=map(denom,m1); # A301274
%p A301273 m4:=map(round,m1); # A301277
%t A301273 a[n_] := Prime @ Range[n] // Mean // Numerator;
%t A301273 a /@ Range[100] (* _Jean-François Alcover_, Nov 16 2019 *)
%o A301273 (Python)
%o A301273 from fractions import Fraction
%o A301273 from sympy import prime
%o A301273 A301273_list, mu = [], Fraction(0)
%o A301273 for i in range(1,10001):
%o A301273     mu += (prime(i)-mu)/i
%o A301273     A301273_list.append(mu.numerator) # _Chai Wah Wu_, Mar 22 2018
%Y A301273 Mean and variance of primes: A301273/A301274, A301275/A301276, A301277, A273462.
%K A301273 nonn,frac
%O A301273 1,1
%A A301273 _N. J. A. Sloane_, Mar 18 2018