OFFSET
1,1
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..310
EXAMPLE
3 is a term since the harmonic mean of its divisors, {1, 3}, is 3/2.
15 is a term since the harmonic mean of its divisors, {1, 3, 5, 15}, is 5/2.
MAPLE
filter:= proc(n) local L, h;
L:= map(t->1/t, numtheory:-divisors(n));
denom(nops(L)/convert(L, `+`))=2;
end proc:
select(filter, [$1..10^6]); # Robert Israel, Oct 17 2021
MATHEMATICA
Select[Range[10^5], Denominator[DivisorSigma[0, #]/DivisorSigma[-1, #]] == 2 &]
Select[Range[500000], Denominator[HarmonicMean[Divisors[#]]]==2&] (* Harvey P. Dale, Apr 06 2023 *)
PROG
(PARI) isok(m) = my(d=divisors(m)); denominator(#d/sum(k=1, #d, 1/d[k])) == 2; \\ Michel Marcus, Oct 18 2021
(Python)
from sympy import gcd, divisor_sigma
A348411_list = [n for n in range(1, 10**3) if (lambda x, y: 2*gcd(x, y*n)==x)(divisor_sigma(n), divisor_sigma(n, 0))] # Chai Wah Wu, Oct 20 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Oct 17 2021
STATUS
approved