cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A055573 Number of terms in simple continued fraction for n-th harmonic number H_n = Sum_{k=1..n} (1/k).

This page as a plain text file.
%I A055573 #36 Feb 16 2025 08:32:43
%S A055573 1,2,3,2,5,4,6,7,10,8,7,10,15,9,9,17,18,11,20,16,18,18,23,19,24,25,24,
%T A055573 26,29,21,24,23,26,25,32,34,33,26,24,31,32,31,36,36,39,32,34,42,47,44,
%U A055573 46,35,40,48,43,47,59,50,49,39,50,66,54,44,54,49,41,64,47,46,54,71,72
%N A055573 Number of terms in simple continued fraction for n-th harmonic number H_n = Sum_{k=1..n} (1/k).
%C A055573 By "simple continued fraction" is meant a continued fraction whose terms are positive integers and the final term is >= 2.
%C A055573 Does any number appear infinitely often in this sequence?
%D A055573 Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 156
%H A055573 G. C. Greubel, <a href="/A055573/b055573.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..500 from M. F. Hasler)
%H A055573 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HarmonicNumber.html">Harmonic Number</a>
%H A055573 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ContinuedFraction.html">Continued Fraction</a>
%H A055573 G. Xiao, Contfrac server, <a href="http://wims.unice.fr/~wims/en_tool~number~contfrac.en.html">To evaluate H(m) and display its continued fraction expansion, operate on "sum(n=1, m, 1/n)"</a>
%F A055573 It appears that lim n -> infinity a(n)/n = C = 0.84... - _Benoit Cloitre_, May 04 2002
%F A055573 Conjecture: limit n -> infinity a(n)/n = 12*log(2)/Pi^2 = 0.84..... = A089729 Levy's constant. - _Benoit Cloitre_, Jan 17 2004
%e A055573 Sum_{k=1 to 3} [1/k] = 11/6 = 1 + 1/(1 + 1/5), so the 3rd term is 3 because the simple continued fraction for the 3rd harmonic number has 3 terms.
%t A055573 Table[ Length[ ContinuedFraction[ HarmonicNumber[n]]], {n, 1, 75}] (* _Robert G. Wilson v_, Dec 22 2003 *)
%o A055573 (PARI) c=0;h=0;for(n=1,500,write("projects/b055573.txt",c++," ",#contfrac(h+=1/n))) \\ _M. F. Hasler_, May 31 2008
%o A055573 (Python)
%o A055573 from sympy import harmonic
%o A055573 from sympy.ntheory.continued_fraction import continued_fraction
%o A055573 def A055573(n): return len(continued_fraction(harmonic(n))) # _Chai Wah Wu_, Jun 27 2024
%Y A055573 m-th harmonic number H(m) = A001008(m)/A002805(m).
%Y A055573 Cf. A058027, A100398, A110020, A112286, A112287.
%Y A055573 Cf. A139001 (partial sums).
%K A055573 nonn
%O A055573 1,2
%A A055573 _Leroy Quet_, Jul 10 2000