%I #28 Dec 16 2023 17:05:06
%S 4,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,
%T 8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,
%U 8,4,8,4,8,4,8,4,8,4,8,4
%N Continued fraction for sqrt(18).
%H Harry J. Smith, <a href="/A040013/b040013.txt">Table of n, a(n) for n = 0..20000</a>
%H G. Xiao, <a href="http://wims.unice.fr/~wims/en_tool~number~contfrac.en.html">Contfrac</a>
%H <a href="/index/Con#confC">Index entries for continued fractions for constants</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,1).
%e 4.242640687119285146405066172... = 4 + 1/(4 + 1/(8 + 1/(4 + 1/(8 + ...)))). - _Harry J. Smith_, Jun 03 2009
%t ContinuedFraction[Sqrt[18],300] (* _Vladimir Joseph Stephan Orlovsky_, Mar 05 2011 *)
%t PadRight[{4},120,{8,4}] (* _Harvey P. Dale_, Dec 31 2022 *)
%o (PARI) { allocatemem(932245000); default(realprecision, 31000); x=contfrac(sqrt(18)); for (n=0, 20000, write("b040013.txt", n, " ", x[n+1])); } \\ _Harry J. Smith_, Jun 03 2009
%Y Cf. A010474 Decimal expansion. - _Harry J. Smith_, Jun 03 2009
%K nonn,cofr,easy
%O 0,1
%A _N. J. A. Sloane_
|