login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A339022
a(n) is the floor of the average distance among first n primes.
2
1, 2, 2, 4, 5, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 23, 24, 26, 27, 29, 30, 32, 34, 36, 38, 39, 41, 42, 44, 46, 48, 50, 52, 54, 56, 57, 59, 61, 63, 65, 67, 69, 71, 72, 74, 77, 79, 81, 83, 85, 86, 88, 90, 92, 95, 96, 98, 100, 102, 104, 106, 108
OFFSET
2,2
COMMENTS
Is the limit of a(n)/n finite?
FORMULA
a(n) = floor((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}]//Floor
CROSSREFS
Cf. A338869 (Shortest most frequent distance among first n primes).
Sequence in context: A260295 A024683 A244017 * A341467 A341468 A071528
KEYWORD
nonn
AUTHOR
Andres Cicuttin, Nov 19 2020
STATUS
approved