OFFSET
1,2
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
MAPLE
S1:= 0:S2:= 0:
for n from 1 to 100 do
p:= ithprime(n);
S1:= S1 + p;
S2:= S2 + n*p;
A[n]:= denom(S2/S1)
od:
seq(A[i], i=1..100); # Robert Israel, Jul 08 2019
MATHEMATICA
a[n_]:=Sum[i*Prime[i], {i, 1, n}]/Sum[Prime[i], {i, 1, n}];
Table[a[n]//Denominator, {n, 1, 48}]
PROG
(PARI) a(n) = my(vp=primes(n)); denominator(sum(i=1, n, i*vp[i])/sum(i=1, n, vp[i])) \\ Michel Marcus, Apr 25 2019
CROSSREFS
KEYWORD
AUTHOR
Andres Cicuttin, Apr 25 2019
STATUS
approved