OFFSET
1,1
LINKS
Colin Barker, Table of n, a(n) for n = 1..500
EXAMPLE
a(3) = 72 because the first 3 composite numbers are [4,6,8] and 3 / (1/4+1/6+1/8) = 72/13.
MATHEMATICA
Module[{comps=Select[Range[50], CompositeQ], len}, len=Length[comps]; Table[ HarmonicMean[ Take[comps, n]], {n, len}]]//Numerator (* Harvey P. Dale, Jun 30 2017 *)
PROG
(PARI)
harmonicmean(v) = #v / sum(k=1, #v, 1/v[k])
composite(n) = for(k=0, primepi(n), isprime(n++)&&k--); n \\ from A002808
s=vector(100); for(k=1, #s, s[k]=numerator(harmonicmean(vector(k, i, composite(i))))); s
CROSSREFS
KEYWORD
nonn
AUTHOR
Colin Barker, Nov 14 2014
STATUS
approved