OFFSET
2,3
FORMULA
a(n) = denominator((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}]//Denominator
(* Also *)
denavepdist[n_]:=Module[{pset, p2s, diffp2s},
pset=Prime[Range[n]];
p2s=Subsets[pset, {2}];
diffp2s=Map[Differences, p2s]//Flatten//Tally;
Sum[diffp2s[[j]][[1]]*diffp2s[[j]][[2]], {j, 1, Length[diffp2s]}]/Length[p2s]//Denominator//Return];
Table[denavepdist[n], {n, 2, 2^6}]
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Andres Cicuttin, Nov 21 2020
STATUS
approved