%I #26 Dec 27 2023 00:39:28
%S 9,2,18,2,18,2,18,2,18,2,18,2,18,2,18,2,18,2,18,2,18,2,18,2,18,2,18,2,
%T 18,2,18,2,18,2,18,2,18,2,18,2,18,2,18,2,18,2,18,2,18,2,18,2,18,2,18,
%U 2,18,2,18,2,18,2,18,2,18,2
%N Continued fraction for sqrt(90).
%H Harry J. Smith, <a href="/A040080/b040080.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 9.4868329805051379959966806... = 9 + 1/(2 + 1/(18 + 1/(2 + 1/(18 + ...)))). - _Harry J. Smith_, Jun 11 2009
%p Digits := 100: convert(evalf(sqrt(N)),confrac,90,'cvgts'):
%t ContinuedFraction[Sqrt[90],300] (* _Vladimir Joseph Stephan Orlovsky_, Mar 10 2011 *)
%t PadRight[{9},120,{18,2}] (* _Harvey P. Dale_, Jun 13 2017 *)
%o (PARI) { allocatemem(932245000); default(realprecision, 32000); x=contfrac(sqrt(90)); for (n=0, 20000, write("b040080.txt", n, " ", x[n+1])); } \\ _Harry J. Smith_, Jun 11 2009
%o (PARI) a(n) = if (!n, 9, if (n % 2, 2, 18)); \\ _Michel Marcus_, Jan 03 2016
%Y Cf. A010541 Decimal expansion. - _Harry J. Smith_, Jun 11 2009
%K nonn,cofr,easy
%O 0,1
%A _N. J. A. Sloane_
|