login
A301276
Denominator of variance of first n primes.
6
1, 2, 3, 12, 5, 30, 21, 56, 18, 30, 55, 132, 39, 182, 15, 80, 68, 34, 171, 380, 105, 462, 11, 184, 6, 650, 351, 84, 203, 290, 465, 992, 264, 374, 595, 140, 333, 1406, 741, 520, 205, 574, 903, 1892, 495, 230, 1081, 2256, 588, 2450, 1275, 884, 13, 318, 1485
OFFSET
1,2
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, 1, Variance[Prime[Range[n]]] // Denominator];
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)
A301276_list = [variance.denominator]
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.denominator) # Chai Wah Wu, Mar 22 2018
CROSSREFS
Mean and variance of primes: A301273/A301274, A301275/A301276, A301277, A273462.
Sequence in context: A120487 A237873 A069220 * A062957 A288129 A288058
KEYWORD
nonn,frac
AUTHOR
N. J. A. Sloane, Mar 18 2018
STATUS
approved