The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A332094 Numerator of the average distance among first n primes. 1
1, 2, 17, 22, 27, 142, 31, 9, 97, 666, 83, 604, 1529, 1906, 791, 367, 3533, 4238, 5019, 584, 617, 7822, 8995, 518, 473, 13342, 1663, 8324, 3689, 20662, 23003, 532, 1655, 31074, 541, 6218, 2145, 44354, 48187, 2613, 18805, 20330, 65651, 356, 15083, 80894, 28979, 23293 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,2
LINKS
FORMULA
a(n) = numerator((2/(n*(n-1))*Sum_{j=2..n} Sum_{i=1..j-1} (prime(j) - prime(i))).
MATHEMATICA
nmax=64;
Table[Total[Flatten[Table[Table[Prime[k] - Prime[j], {j, 1, k - 1}], {k, 2, n}]]]/(n*(n - 1)/2), {n, 2, nmax}]//Numerator
PROG
(PARI) lista(nn) = {my(vp = primes(nn)); vector(nn-1, k, k++; numerator((2/(k*(k-1))*sum(j=2, k, sum(i=1, j-1, vp[j] - vp[i]))))); } \\ Michel Marcus, Nov 21 2020
CROSSREFS
Cf. A336814 (denominator), A338869, A339022, A062020.
Sequence in context: A157191 A371478 A006029 * A126961 A106622 A040992
KEYWORD
nonn,frac
AUTHOR
Andres Cicuttin, Nov 20 2020
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 May 13 16:16 EDT 2024. Contains 372522 sequences. (Running on oeis4.)