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.

A040005 Continued fraction for sqrt(8).

Original entry on oeis.org

2, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4
Offset: 0

Views

Author

Keywords

Examples

			2.828427124746190097603377448... = 2 + 1/(1 + 1/(4 + 1/(1 + 1/(4 + ...)))). - _Harry J. Smith_, Jun 02 2009
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.

Crossrefs

Cf. A010466 (decimal expansion).
Essentially the same as A010685.

Programs

  • Maple
    Digits := 100: convert(evalf(sqrt(N)),confrac,90,'cvgts'):
  • Mathematica
    ContinuedFraction[Sqrt[8],300] (* Vladimir Joseph Stephan Orlovsky, Mar 04 2011 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 16000); x=contfrac(sqrt(8)); for (n=0, 20000, write("b040005.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 02 2009

Formula

From Amiram Eldar, Nov 12 2023: (Start)
Multiplicative with a(2^e) = 4, and a(p^e) = 1 for an odd prime p.
Dirichlet g.f.: zeta(s) * (1 + 3/2^s). (End)
G.f.: (2 + x + 2*x^2)/(1 - x^2). - Stefano Spezia, Jul 26 2025