OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..200
EXAMPLE
MATHEMATICA
f[p_, e_] := Module[{b = IntegerDigits[e, 2], m}, m = Length[b]; Product[If[b[[j]] > 0, 2/(1 + p^(2^(m - j))), 1], {j, 1, m}]]; ihmean[1] = 1; ihmean[n_] := n*Times @@ f @@@ FactorInteger[n]; seq[kmax_] := Module[{ih, ihmax = 0, s = {}}, Do[ih = ihmean[k]; If[ih > ihmax, ihmax = ih; AppendTo[s, k]], {k, 1, kmax}]; s]; seq[20000]
PROG
(PARI) ihmean(n) = {my(f = factor(n), b); n * prod(i=1, #f~, b = binary(f[i, 2]); prod(k=1, #b, if(b[k], 2/(f[i, 1]^(2^(#b-k))+1), 1))); };
lista(kmax) = {my(ih, ihmax=0); for(k = 1, kmax, ih = ihmean(k); if(ih > ihmax, ihmax = ih; print1(k, ", "))); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Mar 09 2023
STATUS
approved