%I
%S 20,5,1,2,1,5,40,5,1,2,1,5,40,5,1,2,1,5,40,5,1,2,1,5,40,5,1,2,1,5,40,
%T 5,1,2,1,5,40,5,1,2,1,5,40,5,1,2,1,5,40,5,1,2,1,5,40,5,1,2,1,5,40,5,1,
%U 2,1,5,40,5,1,2,1,5,40,5,1,2,1,5,40,5,1,2,1,5,40,5,1
%N Continued fraction for sqrt(407).
%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 a(n)=(1/30)*{-157*(n mod 6)-2*[(n+1) mod 6]+23*[(n+2) mod 6]+13*[(n+3) mod 6]+38*[(n+4) mod 6]+193*[(n+5) mod 6]}-20*[C(2*n,n) mod 2], with n>=0 [From _Paolo P. Lava_, Apr 30 2009]
%p with(numtheory): Digits := 300: convert(evalf(sqrt(407)),confrac);
%t ContinuedFraction[Sqrt[407],120] (* or *) PadRight[{20},120,{40,5,1,2,1,5}] (* _Harvey P. Dale_, Jun 10 2018 *)
%K nonn,cofr,easy
%O 0,1
%A _N. J. A. Sloane_.
|