OFFSET
1,3
LINKS
Eric Weisstein's World of Mathematics, Continued Fraction.
EXAMPLE
a(4) = 5 because sum 1/4 + (1/1 +...+1/5)= 38/15 and continued fraction for 38/15 has terms {2,1,1,7} and length 4.
MATHEMATICA
f[n_] := Block[{k = 1}, While[ Length[ ContinuedFraction[1/n + HarmonicNumber[k]]] != n && k < 1000, k++ ]; If[k == 1000, 0, k]]; Table[ f[n], {n, 80}] (* Robert G. Wilson v, Jun 03 2005 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 02 2005
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jun 03 2005
STATUS
approved