OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Peter Hagis, Jr. and Graeme L. Cohen, Infinitary harmonic numbers, Bull. Australian Math. Soc., Vol. 41, No. 1 (1990), pp. 151-158.
FORMULA
EXAMPLE
Fractions begin with 1, 4/3, 3/2, 8/5, 5/3, 2, 7/4, 32/15, 9/5, 20/9, 11/6, 12/5, ...
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}]]; a[1] = 1; a[n_] := Numerator[n * Times @@ f @@@ FactorInteger[n]]; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n), b); numerator(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)))); }
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Amiram Eldar, Mar 09 2023
STATUS
approved