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.

A040003 Continued fraction for sqrt(6).

This page as a plain text file.
%I A040003 #55 Aug 10 2025 14:39:11
%S A040003 2,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,
%T A040003 4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,
%U A040003 4,2,4,2,4,2,4,2,4,2,4,2,4
%N A040003 Continued fraction for sqrt(6).
%D A040003 Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, ยง4.4 Powers and Roots, p. 143.
%D A040003 James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.
%H A040003 Harry J. Smith, <a href="/A040003/b040003.txt">Table of n, a(n) for n = 0..20000</a>
%H A040003 G. Xiao, <a href="http://wims.unice.fr/~wims/en_tool~number~contfrac.en.html">Contfrac</a>.
%H A040003 <a href="/index/Con#confC">Index entries for continued fractions for constants</a>.
%H A040003 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,1).
%F A040003 a(n-1) = gcd(2^n, 3^n+1) (empirical). - _Michel Marcus_, Sep 03 2020
%F A040003 G.f.: 2*(1 + x + x^2)/(1 - x^2). - _Stefano Spezia_, Jul 26 2025
%e A040003 2.449489742783178098197284074... = 2 + 1/(2 + 1/(4 + 1/(2 + 1/(4 + ...)))). - _Harry J. Smith_, Jun 01 2009
%p A040003 Digits := 100: convert(evalf(sqrt(N)),confrac,90,'cvgts'):
%t A040003 ContinuedFraction[Sqrt[6], 300] (* _Vladimir Joseph Stephan Orlovsky_, Mar 04 2011 *)
%o A040003 (PARI) { allocatemem(932245000); default(realprecision, 21000); x=contfrac(sqrt(6)); for (n=0, 20000, write("b040003.txt", n, " ", x[n+1])); } \\ _Harry J. Smith_, Jun 01 2009
%Y A040003 Cf. A010464 (decimal expansion).
%Y A040003 Equals twice A040001.
%Y A040003 Essentially the same as A010694.
%K A040003 nonn,cofr,easy
%O A040003 0,1
%A A040003 _N. J. A. Sloane_