login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A301275 Numerator of variance of first n primes. 6
0, 1, 7, 59, 64, 581, 649, 2287, 1001, 2443, 5669, 17915, 6665, 36637, 3529, 22413, 22813, 13065, 75865, 191819, 58778, 289013, 7627, 141973, 5213, 628001, 370333, 96211, 249436, 381167, 672727, 1565639, 453767, 691587, 1194917, 301867, 770294 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Variance here is the sample variance unbiased estimator. - Chai Wah Wu, Mar 22 2018
LINKS
Joel E. Cohen, Statistics of Primes (and Probably Twin Primes) Satisfy Taylor’s Law from Ecology, The American Statistician, 70 (2016), 399-404.
EXAMPLE
The variances are 0, 1/2, 7/3, 59/12, 64/5, 581/30, 649/21, 2287/56, 1001/18, 2443/30, 5669/55, 17915/132, 6665/39, 36637/182, 3529/15, 22413/80, 22813/68, 13065/34, 75865/171, 191819/380, 58778/105, 289013/462, 7627/11, 141973/184, 5213/6, 628001/650, ...
MAPLE
v := n -> 1/(n-1) * add((ithprime(i) add(ithprime(j), j=1..n)/n)^2, i=1..n );
v1:= [0, seq(v(n), n=2..70)];
MATHEMATICA
a[n_] := If[n == 1, 0, Variance[Prime[Range[n]]] // Numerator];
a /@ Range[100] (* Jean-François Alcover, Oct 27 2019 *)
PROG
(Python)
from fractions import Fraction
from sympy import prime
mu, variance = Fraction(prime(1)), Fraction(0)
A301275_list = [variance.numerator]
for i in range(2, 10001):
datapoint = prime(i)
newmu = mu+(datapoint-mu)/i
variance = (variance*(i-2) + (datapoint-mu)*(datapoint-newmu))/(i-1)
mu = newmu
A301275_list.append(variance.numerator) # Chai Wah Wu, Mar 22 2018
CROSSREFS
Mean and variance of primes: A301273/A301274, A301275/A301276, A301277, A273462.
Sequence in context: A005332 A132546 A210404 * A366213 A061424 A140371
KEYWORD
nonn,frac
AUTHOR
N. J. A. Sloane, Mar 18 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)