OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Jozsef Sandor, On bi-unitary harmonic numbers, arXiv:1105.0294 [math.NT], 2011.
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_] := p^e * If[OddQ[e], (e + 1)*(p - 1)/(p^(e + 1) - 1), e/((p^(e + 1) - 1)/(p - 1) - p^(e/2))]; a[1] = 1; a[n_] := Numerator[Times @@ f @@@ FactorInteger[n]]; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n), p, e); numerator(n * prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; if(e%2, (e + 1)*(p - 1)/(p^(e + 1) - 1), e/((p^(e + 1) - 1)/(p - 1) - p^(e/2))))); }
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Amiram Eldar, Mar 24 2023
STATUS
approved