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.

A336814 Denominator of the average distance among first n primes.

This page as a plain text file.
%I A336814 #15 Dec 20 2024 02:08:35
%S A336814 1,1,6,5,5,21,4,1,9,55,6,39,91,105,40,17,153,171,190,21,21,253,276,15,
%T A336814 13,351,42,203,87,465,496,11,33,595,10,111,37,741,780,41,287,301,946,
%U A336814 5,207,1081,376,294,35,425,1326,689,477,33,1540,133,551,1711,1770,915,1891,1953,224
%N A336814 Denominator of the average distance among first n primes.
%F A336814 a(n) = denominator((2/(n*(n-1)))*Sum_{j=2..n} Sum_{i=1..j-1} (prime(j) - prime(i))).
%t A336814 nmax=64;
%t A336814 Table[Total[Flatten[Table[Table[Prime[k] - Prime[j], {j, 1, k - 1}], {k, 2, n}]]]/(n*(n - 1)/2), {n, 2, nmax}]//Denominator
%t A336814 (* Also *)
%t A336814 denavepdist[n_]:=Module[{pset,p2s,diffp2s},
%t A336814 pset=Prime[Range[n]];
%t A336814 p2s=Subsets[pset,{2}];
%t A336814 diffp2s=Map[Differences,p2s]//Flatten//Tally;
%t A336814 Sum[diffp2s[[j]][[1]]*diffp2s[[j]][[2]],{j,1,Length[diffp2s]}]/Length[p2s]//Denominator//Return];
%t A336814 Table[denavepdist[n],{n,2,2^6}]
%Y A336814 Cf. A332094 (numerator), A338869, A339022, A062020.
%K A336814 nonn,frac
%O A336814 2,3
%A A336814 _Andres Cicuttin_, Nov 21 2020