OFFSET
1,2
COMMENTS
Each term appears a finite number of times in the sequence (Hagis and Cohen, 1990).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..239
Peter Hagis, Jr. and Graeme L. Cohen, Infinitary harmonic numbers, Bull. Australian math. Soc., Vol. 41 (1990), pp. 151-158.
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}]]; ih[1] = 1; ih[n_] := n*Times @@ f @@@ FactorInteger[n]; ic[n_] := Plus @@ (DigitCount[Last /@ FactorInteger[n], 2, 1]); ic[1] = 0; ic /@ Select[Range[10^5], IntegerQ[ih[#]] &]
PROG
(PARI) A064547(n) = {my(f = factor(n)[, 2]); sum(k=1, #f, hammingweight(f[k])); } \\ Michel Marcus at A064547
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); for(k = 1, kmax, ih = ihmean(k); if(denominator(ih) == 1, print1(A064547(k), ", "))); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Mar 10 2023
STATUS
approved