%I #48 Dec 27 2023 00:12:41
%S 10,2,1,9,1,2,20,2,1,9,1,2,20,2,1,9,1,2,20,2,1,9,1,2,20,2,1,9,1,2,20,
%T 2,1,9,1,2,20,2,1,9,1,2,20,2,1,9,1,2,20,2,1,9,1,2,20,2,1,9,1,2,20,2,1,
%U 9,1,2,20,2,1,9,1,2,20,2,1
%N Continued fraction for sqrt(107).
%H Vincenzo Librandi, <a href="/A010173/b010173.txt">Table of n, a(n) for n = 0..999</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_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,1).
%F G.f.: (-10*x^6 - 2*x^5 - x^4 - 9*x^3 - x^2 - 2*x - 10)/(x^6 - 1). - _Chai Wah Wu_, Oct 02 2021
%t ContinuedFraction[Sqrt[107],300] (* _Vladimir Joseph Stephan Orlovsky_, Mar 11 2011 *)
%o (Python)
%o from sympy import sqrt
%o from sympy.ntheory.continued_fraction import continued_fraction_iterator
%o def aupton(terms):
%o gen = continued_fraction_iterator(sqrt(107))
%o return [next(gen) for i in range(terms)]
%o print(aupton(82)) # _Michael S. Branicky_, Oct 02 2021
%Y Cf. A177935 (decimal expansion), A041192/A041193 (convergents).
%K nonn,cofr,easy
%O 0,1
%A _N. J. A. Sloane_
|