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.

Previous Showing 21-23 of 23 results.

A373893 a(n) is the length of the simple continued fraction for the n-th alternating harmonic number.

Original entry on oeis.org

0, 1, 2, 4, 7, 7, 5, 9, 8, 12, 9, 12, 11, 12, 13, 12, 18, 12, 17, 15, 15, 15, 19, 21, 18, 13, 21, 23, 25, 23, 26, 32, 28, 25, 24, 24, 31, 32, 33, 36, 41, 38, 38, 37, 44, 41, 37, 39, 47, 48, 42, 43, 43, 44, 46, 42, 44, 51, 45, 49, 52, 53, 62, 50, 57, 48, 55, 60, 52, 58, 70, 58, 60, 73, 67
Offset: 1

Views

Author

Ilya Gutkovskiy, Jun 21 2024

Keywords

Comments

By "simple continued fraction" is meant a continued fraction whose terms are positive integers and the final term is >= 2.

Examples

			Sum_{k=1..7} (-1)^(k+1)/k = 319/420 = 1/(1 + 1/(3 + 1/(6 + 1/(3 + 1/5)))), so a(7) = 5.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[ContinuedFraction[Sum[(-1)^(k + 1)/k, {k, 1, n}]]] - 1, {n, 1, 75}]
  • Python
    from fractions import Fraction
    from sympy.ntheory.continued_fraction import continued_fraction
    def A373893(n): return len(continued_fraction(sum(Fraction(1 if k&1 else -1,k) for k in range(1,n+1))))-1 # Chai Wah Wu, Jun 27 2024

A091590 Number of terms in the simple continued fraction for the 10^n-th harmonic number, H_n = sum_{k=1 to n} (1/k).

Original entry on oeis.org

1, 8, 68, 834, 8356, 84548, 841817, 8425934, 84277586
Offset: 0

Views

Author

Robert G. Wilson v, Jan 22 2004

Keywords

Comments

Conjecture: lim n -> infinity, a(n)/10^n -> C = 12*log(2)/Pi^2 = 0.842... - Benoit Cloitre, May 04 2002

References

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

Crossrefs

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

Programs

  • Mathematica
    s = 0; k = 1; Do[ While[s = s + 1/k; k < 10^n, k++ ]; Print[ Length[ ContinuedFraction[s]]]; k++, {n, 0, 6}]
    Table[Length[ContinuedFraction[HarmonicNumber[10^n]]], {n, 0, 7}] (* Harvey P. Dale, Aug 24 2015 *)

Formula

a(n) = A055573(10^n). - Andrew Howroyd, Aug 10 2024

Extensions

Corrected and extended by Eric W. Weisstein, Jan 23 2004

A336089 k such that L(H(k,1)^2) = 2*L(H(k,1)) where L(x) is the number of terms in the continued fraction of x and H(k,r) = Sum_{u=1..k} 1/u^r.

Original entry on oeis.org

7, 10, 14, 275, 293, 359, 509, 518, 526, 531, 643, 671, 701, 710, 1081, 1158, 1318, 1798, 1836, 2368, 2441, 2507, 2591, 2990, 3477, 3589, 3818, 4096, 5582, 5851, 6968, 7180, 7523, 8718, 8745, 8782, 8817, 8844, 8946, 9772, 9905
Offset: 1

Views

Author

Benoit Cloitre, Oct 04 2020

Keywords

Comments

Conjecture: this sequence is infinite. More generally, for any fixed integers a,b,c,d >=1, there are infinitely many k's such that c*d*L(H(k,a)^b) = a*b*L(H(k,c)^d) where L(x) is the number of terms in the continued fraction of x and H(k,r) = Sum_{u=1..k} 1/u^r. Here (a,b,c,d) =(1,2,1,1).

Crossrefs

Programs

  • Mathematica
    c[n_, r_] := Length @ ContinuedFraction @ (HarmonicNumber[n]^r); Select[Range[10^4], c[#, 2] == 2 * c[#, 1] &] (* Amiram Eldar, Oct 04 2020*)
  • PARI
    H1=1; for(n=2, 10000, H1=H1+1/n; if(length(contfrac(H1^2))==2*length(contfrac(H1)), print1(n, ", ")))
Previous Showing 21-23 of 23 results.