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-4 of 4 results.

A058299 Sum of terms in simple continued fraction for Sum_{k=0..n} 1/k!.

Original entry on oeis.org

1, 2, 4, 5, 10, 15, 20, 16, 38, 30, 67, 49, 63, 80, 92, 139, 173, 99, 127, 159, 190, 198, 423, 198, 259, 221, 326, 631, 394, 273, 280, 341, 359, 397, 539, 418, 518, 533, 662, 3502, 735, 815, 701, 706, 611, 839, 793, 768, 781, 983, 858, 1035, 883, 3476, 1154
Offset: 0

Views

Author

Leroy Quet, Dec 07 2000

Keywords

Examples

			a(3) = 2 + 1 + 2 = 5 because 1/0! + 1/1! + 1/2! + 1/3! = 8/3 = 2 + 1/(1 + 1/2).
		

Crossrefs

Cf. A069880 (number of summands).

Programs

  • Maple
    seq(convert(numtheory:-cfrac(add(1/k!,k=0..n),quotients),`+`), n=0..100); # Robert Israel, Aug 29 2018
  • PARI
    a(n) = vecsum(contfrac(sum(k=0, n, 1/k!))); \\ Michel Marcus, Aug 29 2018

A070267 Maximum element in the simple continued fraction expansion of e(n) = 1+1/2!+1/3!+...+1/n!.

Original entry on oeis.org

1, 2, 2, 3, 8, 5, 4, 14, 6, 29, 10, 16, 20, 18, 42, 59, 13, 14, 59, 35, 31, 184, 24, 65, 42, 64, 401, 71, 26, 24, 36, 31, 52, 187, 28, 41, 128, 177, 3041, 249, 315, 162, 118, 36, 101, 135, 86, 70, 194, 104, 274, 62, 2515, 305, 68, 59, 49, 88, 359, 280, 100, 702, 52
Offset: 1

Views

Author

Benoit Cloitre, May 09 2002

Keywords

Examples

			The simple continued fraction expansion of e(10) is [1, 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 11, 1, 1, 29, 1, 1, 2], hence a(10) = 29.
		

Crossrefs

Programs

  • Mathematica
    Table[ Max[ ContinuedFraction[ Sum[1/i!, {i, 1, n}]]], {n, 1, 65}]

A070154 Number of terms in the simple continued fraction expansion of Sum_{k=0..n}(-1)^k/(2k+1), the Leibniz-Gregory series for Pi/4.

Original entry on oeis.org

1, 3, 4, 9, 5, 9, 14, 10, 10, 19, 16, 21, 22, 22, 24, 20, 19, 24, 28, 28, 29, 30, 39, 31, 44, 40, 44, 33, 41, 47, 44, 48, 54, 48, 60, 49, 63, 51, 65, 72, 64, 70, 78, 64, 79, 77, 74, 87, 75, 86, 82, 94, 88, 106, 106, 94, 104, 108, 87, 107, 86, 106, 98, 110, 115, 110, 105, 115
Offset: 0

Views

Author

Benoit Cloitre, May 06 2002

Keywords

Comments

Pi/4 = Sum_{k=>0} (-1)^k/(2k+1).

Examples

			The simple continued fraction for Sum(k=0,10,(-1)^k/(2k+1)) is [0, 1, 4, 4, 1, 3, 54, 1, 2, 1, 1, 4, 11, 1, 2, 2] which contains 16 elements, hence a(10)=16.
		

Crossrefs

Programs

  • Mathematica
    lcf[f_] := Length[ContinuedFraction[f]]; lcf /@ Accumulate[Table[(-1)^k/(2*k + 1), {k, 0, 100}]] (* Amiram Eldar, Apr 29 2022 *)
  • PARI
    for(n=1,100,print1( length(contfrac(sum(i=0,n,(-1)^i/(2*i+1)))),","))

Formula

Limit_{n -> infinity} a(n)/n = C = 1.6...

Extensions

Offset changed to 0 and a(0) inserted by Amiram Eldar, Apr 29 2022

A071528 Number of 1's among the elements of the simple continued fraction for e(n)=sum(k=1,n,1/k!).

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 6, 8, 7, 12, 11, 11, 15, 13, 13, 16, 19, 17, 18, 19, 23, 25, 25, 27, 29, 32, 32, 27, 40, 40, 46, 35, 44, 38, 41, 43, 40, 46, 45, 55, 54, 57, 62, 53, 57, 52, 59, 67, 61, 67, 66, 69, 74, 80, 79, 85, 77, 78, 76, 83, 85, 88, 96, 78, 101, 93, 89, 101, 88, 106, 95
Offset: 1

Views

Author

Benoit Cloitre, Jun 02 2002

Keywords

Comments

It seems that lim n ->infinity a(n)/A069880(n) = C = 0.5... which is different from (log(4)-log(3))/log(2)=0.415... the expected density of 1's (cf. measure theory of continued fractions).

Examples

			e(10) has for continued fraction [1, 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 11, 1, 1, 29, 1, 1, 2] which contains 12 "1's" hence a(10)=12.
		

Programs

  • PARI
    for(n=1,150,if(prod(i=1,length(contfrac((1+1/n)^n)),n-component(contfrac((1+1/n)^n),i)) == 0,print1(n,",")))
Showing 1-4 of 4 results.