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).

This page as a plain text file.
%I A040005 #34 Aug 10 2025 14:40:00
%S A040005 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,
%T A040005 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,
%U A040005 4,1,4,1,4,1,4,1,4,1,4,1,4
%N A040005 Continued fraction for sqrt(8).
%D A040005 James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.
%H A040005 Harry J. Smith, <a href="/A040005/b040005.txt">Table of n, a(n) for n = 0..20000</a>
%H A040005 G. Xiao, <a href="http://wims.unice.fr/~wims/en_tool~number~contfrac.en.html">Contfrac</a>.
%H A040005 <a href="/index/Con#confC">Index entries for continued fractions for constants</a>.
%H A040005 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,1).
%F A040005 From _Amiram Eldar_, Nov 12 2023: (Start)
%F A040005 Multiplicative with a(2^e) = 4, and a(p^e) = 1 for an odd prime p.
%F A040005 Dirichlet g.f.: zeta(s) * (1 + 3/2^s). (End)
%F A040005 G.f.: (2 + x + 2*x^2)/(1 - x^2). - _Stefano Spezia_, Jul 26 2025
%e A040005 2.828427124746190097603377448... = 2 + 1/(1 + 1/(4 + 1/(1 + 1/(4 + ...)))). - _Harry J. Smith_, Jun 02 2009
%p A040005 Digits := 100: convert(evalf(sqrt(N)),confrac,90,'cvgts'):
%t A040005 ContinuedFraction[Sqrt[8],300] (* _Vladimir Joseph Stephan Orlovsky_, Mar 04 2011 *)
%o A040005 (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
%Y A040005 Cf. A010466 (decimal expansion).
%Y A040005 Essentially the same as A010685.
%K A040005 nonn,cofr,easy,mult
%O A040005 0,1
%A A040005 _N. J. A. Sloane_