OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..142
EXAMPLE
H(4) = 1 + 1/2 + 1/3 + 1/4 = 25/12 has the Egyptian fraction expansion, by the greedy algorithm, of 1 + 1 + 1/12. Since there are 3 terms in this expansion, a(4) = 3.
MATHEMATICA
egyptFraction[f_] := Ceiling[1/Most[NestWhileList[# - 1/Ceiling[1/#] &, f, # != 0 &]]]; a[n_] := Length[egyptFraction[HarmonicNumber[n]]]; Array[a, 100] (* Amiram Eldar, Apr 09 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Sep 04 2005
EXTENSIONS
More terms from David Wasserman, Apr 16 2009
STATUS
approved