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-8 of 8 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

A110020 Final term of the simple continued fraction for H(n), where H(n) = Sum_{k=1..n} 1/k.

Original entry on oeis.org

1, 2, 5, 12, 8, 2, 5, 7, 3, 2, 5, 4, 6, 13, 7, 2, 11, 15, 6, 2, 36, 13, 2, 6, 3, 7, 3, 4, 2, 9, 4, 2, 2, 2, 2, 2, 6, 5, 2, 3, 2, 2, 2, 2, 11, 3, 59, 8, 2, 4, 104, 103, 5, 6, 2, 2, 2, 59, 2, 2, 3, 9, 20, 4, 2, 3, 4, 3, 4, 2, 2, 2, 2, 2, 2, 4, 3, 4, 2, 3, 2, 37, 2, 49, 6, 2, 6, 10, 2, 4, 8, 15, 2, 2, 23, 2
Offset: 1

Views

Author

Leroy Quet, Sep 03 2005

Keywords

Examples

			H(5) = 137/60 = 2 + 1/(3 + 1/(1 + 1/(1 + 1/8))); a(5) is the final term, 8.
		

Crossrefs

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

Programs

  • Mathematica
    Table[Last[ContinuedFraction[HarmonicNumber[n]]], {n, 100}] (* Ray Chandler, Sep 17 2005 *)

Extensions

Extended by Ray Chandler, Sep 17 2005

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)

A332342 Table T(n, k) read by antidiagonals upwards: sum of the terms of the continued fraction for the fractional part of n/k (n>=1, k>=1).

Original entry on oeis.org

0, 0, 2, 0, 0, 3, 0, 2, 3, 4, 0, 0, 0, 2, 5, 0, 2, 3, 4, 4, 6, 0, 0, 3, 0, 4, 3, 7, 0, 2, 0, 4, 5, 2, 5, 8, 0, 0, 3, 2, 0, 3, 5, 4, 9, 0, 2, 3, 4, 5, 6, 5, 5, 6, 10, 0, 0, 0, 0, 4, 0, 5, 2, 3, 5, 11, 0, 2, 3, 4, 4, 6, 7, 5, 6, 6, 7, 12, 0, 0, 3, 2, 5, 3, 0, 4, 6, 4, 6, 6, 13
Offset: 1

Views

Author

Andrey Zabolotskiy, Feb 10 2020

Keywords

Examples

			2/7 = 1/(3+1/2), so T(2, 7) = 3 + 2 = 5.
The table begins:
0 2 3 4 5 6 7 8 9 ...
0 0 3 2 4 3 5 4 6 ...
0 2 0 4 4 2 5 5 3 ...
0 0 3 0 5 3 5 2 6 ...
0 2 3 4 0 6 5 5 6 ...
0 0 0 2 5 0 7 4 3 ...
...
		

Crossrefs

Programs

  • Mathematica
    t[n_,k_] := Total@ ContinuedFraction@ FractionalPart[n/k];
    Flatten[Table[t[nk+k-1,k], {nk,10}, {k,nk}]]
  • Python
    def cofr(p, q):
        return [] if q == 0 else [p // q] + cofr(q, p % q)
    def t(n, k):
        return sum(cofr(n, k)[1:])
    tr = []
    for nk in range(1, 20):
        for k in range(1, nk+1):
            tr.append(t(nk+1-k, k))
    print(tr)

A111047 Product of continued fraction terms of H(n) = Sum_{k=1..n} 1/k.

Original entry on oeis.org

1, 2, 5, 24, 48, 32, 100, 140, 840, 1872, 54000, 12960, 51840, 533871, 322371, 31104, 709632, 1921500, 4147200, 3701376, 124416, 262080, 2488320, 21811680, 403107840, 146966400, 2538086400, 1074954240, 14370048000, 415704960000
Offset: 1

Views

Author

Leroy Quet, Oct 06 2005

Keywords

Comments

The last term of each continued fraction is considered to be >= 2, for n >= 2.

Examples

			1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 = 49/20 = 2 + 1/(2 + 1/(4 + 1/2)), so the 6th term of the sequence is 2*2*4*2 = 32.
		

Crossrefs

Programs

  • PARI
    for(n=1,30,v=contfrac(sum(k=1,n,1/k));print1(prod(j=1,length(v),v[j]),","))

Extensions

More terms from Klaus Brockhaus, Oct 08 2005
Showing 1-8 of 8 results.