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.

Showing 1-6 of 6 results.

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

Original entry on oeis.org

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, 26, 29, 21, 24, 23, 26, 25, 32, 34, 33, 26, 24, 31, 32, 31, 36, 36, 39, 32, 34, 42, 47, 44, 46, 35, 40, 48, 43, 47, 59, 50, 49, 39, 50, 66, 54, 44, 54, 49, 41, 64, 47, 46, 54, 71, 72
Offset: 1

Views

Author

Leroy Quet, Jul 10 2000

Keywords

Comments

By "simple continued fraction" is meant a continued fraction whose terms are positive integers and the final term is >= 2.
Does any number appear infinitely often in this sequence?

Examples

			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.
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 156

Crossrefs

m-th harmonic number H(m) = A001008(m)/A002805(m).
Cf. A139001 (partial sums).

Programs

  • Mathematica
    Table[ Length[ ContinuedFraction[ HarmonicNumber[n]]], {n, 1, 75}] (* Robert G. Wilson v, Dec 22 2003 *)
  • PARI
    c=0;h=0;for(n=1,500,write("projects/b055573.txt",c++," ",#contfrac(h+=1/n))) \\ M. F. Hasler, May 31 2008
    
  • Python
    from sympy import harmonic
    from sympy.ntheory.continued_fraction import continued_fraction
    def A055573(n): return len(continued_fraction(harmonic(n))) # Chai Wah Wu, Jun 27 2024

Formula

It appears that lim n -> infinity a(n)/n = C = 0.84... - Benoit Cloitre, May 04 2002
Conjecture: limit n -> infinity a(n)/n = 12*log(2)/Pi^2 = 0.84..... = A089729 Levy's constant. - Benoit Cloitre, Jan 17 2004

A100398 Array where n-th row (of A055573(n) terms) is the continued fraction terms for the n-th harmonic number, sum{ k=1 to n} 1/k.

Original entry on oeis.org

1, 1, 2, 1, 1, 5, 2, 12, 2, 3, 1, 1, 8, 2, 2, 4, 2, 2, 1, 1, 2, 5, 5, 2, 1, 2, 1, 1, 5, 7, 2, 1, 4, 1, 5, 1, 1, 7, 1, 3, 2, 1, 13, 12, 1, 3, 1, 2, 3, 50, 3, 4, 6, 1, 5, 3, 9, 1, 2, 4, 1, 1, 1, 15, 4, 3, 5, 1, 1, 4, 2, 1, 3, 2, 1, 3, 1, 4, 1, 6, 3, 3, 1, 39, 3, 1, 13, 3, 13, 3, 3, 7, 43, 1, 1, 1, 17, 7, 3, 2
Offset: 1

Views

Author

Leroy Quet, Dec 30 2004

Keywords

Comments

Terms corresponding to H(n) (i.e. the n-th row) end at index A139001(n)=sum(i=1..n,A055573(n)) - M. F. Hasler, May 31 2008

Examples

			Since the 3rd harmonic number is 11/6 = 1 +1/(1 +1/5), the 3rd row is 1,1,5.
		

Crossrefs

m-th harmonic number H(m) = A001008(m)/A002805(m).

Programs

  • Mathematica
    Flatten[Table[ContinuedFraction[HarmonicNumber[n]], {n, 16}]] (* Ray Chandler, Sep 17 2005 *)
  • PARI
    c=0;h=0;for(n=1,500,for(i=1,#t=contfrac(h+=1/n),write("b100398.txt",c++," ",t[i]))) \\ M. F. Hasler, May 31 2008

Extensions

Extended by Ray Chandler, Sep 17 2005

A058027 Sum of terms of continued fraction for n-th harmonic number, 1 + 1/2 + 1/3 + ... + 1/n.

Original entry on oeis.org

1, 3, 7, 14, 15, 10, 16, 19, 26, 35, 72, 41, 38, 79, 83, 42, 59, 143, 68, 61, 70, 51, 50, 78, 74, 82, 130, 113, 111, 315, 235, 1190, 211, 407, 112, 122, 142, 246, 693, 133, 138, 162, 1904, 243, 170, 539, 363, 210, 197, 518, 275, 502, 527, 316, 1729, 224, 228, 909
Offset: 1

Views

Author

Leroy Quet, Nov 15 2000

Keywords

Comments

Is anything known about the asymptotics of this sequence?
Should be asymptotic to D*n^(3/2) with D=0.4.... - Benoit Cloitre, Dec 23 2003

Examples

			1 + 1/2 +1/3 = 11/6 = 1 + 1/(1 + 1/5). So sum of terms of continued fraction is 1 + 1 + 5 = 7.
		

Crossrefs

m-th harmonic number H(m) = A001008(m)/A002805(m).

Programs

  • Mathematica
    Table[Plus @@ ContinuedFraction[HarmonicNumber[n]], {n, 60}] (* Ray Chandler, Sep 17 2005 *)
  • PARI
    a(n) = vecsum(contfrac(sum(k=1, n, 1/k))); \\ Michel Marcus, Mar 23 2017

A112286 a(n) = numerator of sum of reciprocals of the terms of the continued fraction for H(n) = Sum_{k=1..n} 1/k.

Original entry on oeis.org

1, 3, 11, 7, 71, 7, 17, 152, 2699, 701, 691, 248, 133, 137, 61933, 809, 20705, 64896, 3587, 17449, 445, 61897, 208, 20663, 1163, 982, 27281, 1871, 2466139, 44339, 21293609, 13417971, 6229, 54238033, 99737, 3585191, 33583, 40756259, 5956441
Offset: 1

Views

Author

Leroy Quet, Sep 01 2005

Keywords

Examples

			1 +1/2 +1/3 +1/4 +1/5 +1/6 = 49/20 = 2 + 1/(2 + 1/(4 + 1/2)).
So a(6) is 7, the numerator of 7/4 = 1/2 + 1/2 + 1/4 + 1/2.
		

Crossrefs

m-th harmonic number H(m) = A001008(m)/A002805(m).

Programs

  • Mathematica
    f[n_] := Plus @@ (1/# &) /@ ContinuedFraction[Sum[1/k, {k, n}]]; Table[Numerator[f[n]], {n, 40}] (* Ray Chandler, Sep 06 2005 *)

Extensions

Extended by Hans Havermann and Ray Chandler, Sep 06 2005

A112287 a(n) = denominator of sum of reciprocals of the terms of the continued fraction for H(n) = Sum_{k=1..n} 1/k.

Original entry on oeis.org

1, 2, 5, 12, 24, 4, 5, 35, 420, 156, 300, 45, 15, 39, 15351, 72, 1848, 10675, 300, 2142, 36, 5460, 15, 1870, 90, 63, 2040, 120, 138600, 3960, 1750320, 1324895, 440, 3945480, 5220, 158340, 1680, 3341100, 498960, 48048, 1260, 69264, 1510, 1168200, 568260
Offset: 1

Views

Author

Leroy Quet, Sep 01 2005

Keywords

Examples

			1 +1/2 +1/3 +1/4 +1/5 +1/6 = 49/20 = 2 + 1/(2 + 1/(4 + 1/2)).
So a(6) is 4, the denominator of 7/4 = 1/2 + 1/2 + 1/4 + 1/2.
		

Crossrefs

m-th harmonic number H(m) = A001008(m)/A002805(m).

Programs

  • Mathematica
    f[n_] := Plus @@ (1/# &) /@ ContinuedFraction[Sum[1/k, {k, n}]]; Table[Denominator[f[n]], {n, 45}] (* Ray Chandler, Sep 06 2005 *)

Extensions

Extended by Hans Havermann and Ray Chandler, Sep 06 2005

A139001 Partial sums of A055573 = number of terms in continued fraction of H(n)=sum(1/k,k=1..n).

Original entry on oeis.org

1, 3, 6, 8, 13, 17, 23, 30, 40, 48, 55, 65, 80, 89, 98, 115, 133, 144, 164, 180, 198, 216, 239, 258, 282, 307, 331, 357, 386, 407, 431, 454, 480, 505, 537, 571, 604, 630, 654, 685, 717, 748, 784, 820, 859, 891, 925, 967, 1014, 1058, 1104, 1139, 1179, 1227, 1270
Offset: 1

Views

Author

M. F. Hasler, May 31 2008

Keywords

Comments

Sequence A100398 holds the array having as n-th row the continued frac. of H(n); a(n) is the last term of the n-th row and accordingly, a(n-1)+1 is the index where the n-th row starts.

Crossrefs

Programs

  • PARI
    h=s=0;vector(100,n,s+=#contfrac(h+=1/n))

Formula

a(n) = sum_{k=1..n} A055573(k)
Showing 1-6 of 6 results.