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-10 of 11 results. Next

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

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

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)

A260615 Irregular triangle read by rows: the n-th row is the continued fraction expansion of the sum of the reciprocals of the first n primes.

Original entry on oeis.org

0, 2, 0, 1, 5, 1, 30, 1, 5, 1, 2, 12, 1, 3, 1, 2, 1, 9, 1, 1, 7, 1, 2, 1, 9, 1, 2, 1, 2, 12, 7, 1, 2, 2, 13, 1, 1, 1, 8, 13, 5, 4, 1, 2, 5, 8, 1, 2, 6, 1, 1, 4, 10, 1, 2, 3, 1, 3, 1, 2, 238, 1, 28, 1, 42, 2, 2, 7, 1, 1, 4, 1, 1, 1, 6, 1, 41, 3, 1, 1, 51, 1, 9, 2, 3, 2, 5, 1, 2, 1, 6, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 1, 2, 19, 1, 13, 1, 1, 3, 4, 7, 1, 1, 3, 2, 1, 10
Offset: 1

Views

Author

Matthew Campbell, Aug 29 2015

Keywords

Examples

			For row 3, the sum of the first three prime reciprocals equals 1/2 + 1/3 + 1/5 = 31/30. The continued fraction expansion of 31/30 is 1 + (1/30). Because of this, the terms in row 3 are 1 and 30.
From _Michael De Vlieger_, Aug 29 2015: (Start)
Triangle begins:
0,  2
0,  1,   5
1, 30
1,  5,   1,  2, 12
1,  3,   1,  2,  1,  9,  1,  1,  7
1,  2,   1,  9,  1,  2,  1,  2, 12,  7
1,  2,   2, 13,  1,  1,  1,  8, 13,  5,  4
1,  2,   5,  8,  1,  2,  6,  1,  1,  4, 10,  1,  2,  3,  1,  3
1,  2, 238,  1, 28,  1, 42,  2,  2,  7,  1,  1,  4
...
(End)
		

Crossrefs

Cf. A000040.
For the continued fractions of the harmonic numbers, see A100398.
For the numerator of the sum, see A024451.
For the denominator of the sum, see A002110.

Programs

  • Maple
    seq(op(numtheory:-cfrac(s,'quotients')),s=ListTools:-PartialSums(map2(`/`,1,[seq(ithprime(i),i=1..20)]))); # Robert Israel, Sep 06 2015
  • Mathematica
    Table[ContinuedFraction[Sum[1/Prime@k, {k, n}]], {n, 11}] // Flatten (* Michael De Vlieger, Aug 29 2015 *)
  • PARI
    row(n) = contfrac(sum(k=1, n, 1/prime(k)));
    tabf(nn) = for(n=1, nn, print(row(n))); \\ Michel Marcus, Sep 18 2015

A113123 Numerator of next-best approximation to harmonic numbers. a(n) = Numerator of (A055573(n)-1)th convergent of n-th harmonic number, Sum_{k=1..n} 1/k.

Original entry on oeis.org

0, 1, 2, 2, 16, 22, 70, 106, 1836, 2639, 14281, 21167, 167857, 87932, 169452, 923889, 3590229, 950596, 40366604, 23213361, 517630, 1391957, 160363133, 222528683, 10125035246, 4324958013, 81828906108, 71315450571, 4320297286472
Offset: 1

Views

Author

Leroy Quet, Oct 14 2005

Keywords

Comments

A100398 gives terms of continued fractions of harmonic numbers.
For n >= 2, a(n) = the denominator of the ratio equal to the continued fraction made by reversing the order of the terms of the continued fraction of the n-th harmonic number. (The numerator of this ratio is the numerator of the n-th harmonic number, A001008(n).) - Leroy Quet, Dec 24 2006

Examples

			H(6) = 49/20 = 2 +1/(2 +1/(4 +1/2)), so a(6) = numerator of 2 +1/(2 +1/4) = 22/9.
		

Crossrefs

Extensions

More terms from Joshua Zucker, May 08 2006

A113124 Denominator of next-best approximation to harmonic numbers. a(n) = Denominator of (A055573(n)-1)th convergent of n-th harmonic number, Sum_{k=1..n} 1/k.

Original entry on oeis.org

1, 1, 1, 1, 7, 9, 27, 39, 649, 901, 4729, 6821, 52783, 27043, 51067, 273281, 1043807, 271979, 11378119, 6452207, 141997, 377141, 42943389, 58933037, 2653340203, 1122077597, 21027833867, 18159496967, 1090528730477, 236529224117
Offset: 1

Views

Author

Leroy Quet, Oct 14 2005

Keywords

Comments

A100398 gives terms of continued fractions of harmonic numbers.

Examples

			H(6) = 49/20 = 2 +1/(2 +1/(4 +1/2)), so a(6) = denominator of 2 +1/(2 +1/4) = 22/9.
		

Crossrefs

Extensions

More terms from Joshua Zucker, May 08 2006

A139036 a(n) = the number of 1's in the continued fraction expansion of the n-th harmonic number, H(n) = Sum_{k=1 to n} 1/k.

Original entry on oeis.org

1, 1, 2, 0, 2, 0, 2, 3, 5, 3, 1, 4, 6, 2, 3, 8, 8, 5, 8, 4, 10, 8, 8, 8, 7, 12, 9, 10, 13, 9, 8, 5, 10, 9, 12, 17, 15, 7, 9, 13, 8, 14, 12, 13, 14, 12, 11, 18, 17, 21, 19, 11, 12, 18, 16, 21, 33, 28, 19, 14, 20, 31, 19, 17, 21, 21, 16, 28, 23, 19, 18, 27, 40
Offset: 1

Views

Author

Leroy Quet, May 31 2008

Keywords

Examples

			The 7th harmonic number is 1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + 1/7 = 363/140, which has the continued fraction representation 2 + 1/(1 + 1/(1 + 1/(2 + 1/(5 + 1/5)))) = [2;1,1,2,5,5]. There are exactly two 1's in the continued fraction representation, so a(7) = 2.
		

Crossrefs

Cf. A100398.

Programs

  • Mathematica
    Table[Count[ContinuedFraction[HarmonicNumber[n]],1],{n,100}] (* Harvey P. Dale, Nov 24 2016 *)
  • PARI
    a(n) = #select(x->x==1, contfrac(sum(i=1, n, 1/i))); \\ Jinyuan Wang, Mar 01 2020

Extensions

a(10)-a(15) from Gonzalo Ciruelos, Aug 02 2013
Corrected and extended by Harvey P. Dale, Nov 24 2016
Showing 1-10 of 11 results. Next