OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
For n = 2, n has 2 divisors, 1 and 2. Their abundancy indices are sigma(1)/1 = 1 and sigma(2)/2 = 3/2, and their mean abundancy index is (1 + 3/2)/2 = 5/4. Therefore a(2) = denominator(5/4) = 4.
MATHEMATICA
f[p_, e_] := ((e+1)*p^2 - (e+2)*p + p^(-e))/((e+1)*(p-1)^2); a[1] = 1; a[n_] := Denominator[Times @@ f @@@ FactorInteger[n]]; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n), p, e); denominator(prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; ((e+1)*p^2 - (e+2)*p + p^(-e))/((e+1)*(p-1)^2))); }
CROSSREFS
KEYWORD
nonn,easy,frac
AUTHOR
Amiram Eldar, Jul 19 2024
STATUS
approved