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.

A058281 Continued fraction for square root of e.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 9, 1, 1, 13, 1, 1, 17, 1, 1, 21, 1, 1, 25, 1, 1, 29, 1, 1, 33, 1, 1, 37, 1, 1, 41, 1, 1, 45, 1, 1, 49, 1, 1, 53, 1, 1, 57, 1, 1, 61, 1, 1, 65, 1, 1, 69, 1, 1, 73, 1, 1, 77, 1, 1, 81, 1, 1, 85, 1, 1, 89, 1, 1, 93, 1, 1, 97, 1, 1, 101, 1, 1, 105, 1, 1, 109, 1, 1, 113, 1, 1
Offset: 0

Views

Author

Robert G. Wilson v, Dec 07 2000

Keywords

Examples

			sqrt(e) = 1 + 1/(1 + 1/(1 + 1/(1 + 1/(5 + ...)))). - _Harry J. Smith_, May 01 2009
		

Crossrefs

Cf. A019774 (decimal expansion of sqrt(e)).

Programs

  • Mathematica
    ContinuedFraction[ Sqrt[E], 100]
    LinearRecurrence[{0,0,2,0,0,-1},{1,1,1,1,5,1},100] (* Harvey P. Dale, Aug 05 2025 *)
  • PARI
    contfrac(sqrt(exp(1)))
    
  • PARI
    { allocatemem(932245000); default(realprecision, 60000); x=contfrac(sqrt(exp(1))); for (n=1, 20001, write("b058281.txt", n-1, " ", x[n])); } \\ Harry J. Smith, May 01 2009

Formula

a(3k+1) = 4k+1, a(i) = 1 otherwise.
G.f.: -(x^2-x+1)*(x^3-2*x^2-2*x-1) / ((x-1)^2*(x^2+x+1)^2). - Colin Barker, Jun 24 2013
E.g.f.: exp(-x/2)*(exp(3*x/2)*(5 + 4*x) + (4 + 8*x)*cos(sqrt(3)*x/2) - 4*sqrt(3)*sin(sqrt(3)*x/2))/9. - Stefano Spezia, May 05 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = (Pi + 2*log(sqrt(2)+1)) / (4*sqrt(2)). - Amiram Eldar, May 03 2025

Extensions

More terms from Jason Earls, Jul 10 2001