OFFSET
1,1
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1269 from Daniel Lignon)
EXAMPLE
The divisors of 25 are [1,5,25] and the nontrivial divisors are [5]. The harmonic mean is 1/(1/5)=5. That's the same for all squares of prime numbers.
The nontrivial divisors of 345 are [3,5,15,23,69,115] and their harmonic mean is 6/(1/3+1/5+1/15+1/23+1/69+1/115) = 9.
MAPLE
hm:= S -> nops(S)/convert(map(t->1/t, S), `+`):
filter:= n -> not isprime(n) and type(hm(numtheory:-divisors(n) minus {1, n}), integer):
select(filter, [$2..10^5]); # Robert Israel, Nov 17 2014
MATHEMATICA
Select[Range[2, 100000], (Not[PrimeQ[#]] && IntegerQ[HarmonicMean[Rest[Most[Divisors[#]]]]])&]
PROG
(PARI) isok(n) = my(d=divisors(n)); (#d >2) && (denominator((#d-2)/sum(i=2, #d-1, 1/d[i])) == 1);
CROSSREFS
KEYWORD
nonn
AUTHOR
Daniel Lignon, Nov 17 2014
STATUS
approved